How can I install pandas 1.1.0 on Mac under anaconda and get past conda hanging on "Solving environment"

MattG

When I try:

% conda update pandas
Collecting package metadata (current_repodata.json): done
Solving environment: | 

Updating pandas is constricted by 

anaconda -> requires pandas==1.0.5=py38h959d312_0

If you are sure you want an update of your package either try `conda update --all` or install a specific version of the package you want using `conda install <pkg>=<version>`

done

# All requested packages already installed.

This answer on stack overflow said to try:

conda install -c conda-forge pandas==1.1.0

but that just hangs:

% conda install -c conda-forge pandas==1.1.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: | 

As you can see below, I can install the old 1.0.5 version of pandas using

conda install -c anaconda pandas

so I guess my environment seems to be functioning ok...I just can't install v 1.1.0 of Pandas from conda-forge

% conda install -c anaconda pandas
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /opt/anaconda3

  added / updated specs:
    - pandas


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.6.24  |                0         132 KB  anaconda
    certifi-2020.6.20          |           py38_0         159 KB  anaconda
    conda-4.8.5                |           py38_0         3.1 MB  anaconda
    openssl-1.1.1g             |       h1de35cc_0         3.4 MB  anaconda
    pandas-1.0.5               |   py38h959d312_0         9.8 MB  anaconda
    ------------------------------------------------------------
                                           Total:        16.6 MB

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates                                 pkgs/main --> anaconda
  certifi                                         pkgs/main --> anaconda
  conda                                           pkgs/main --> anaconda
  openssl                                         pkgs/main --> anaconda
  pandas                                          pkgs/main --> anaconda


Proceed ([y]/n)? y


Downloading and Extracting Packages
openssl-1.1.1g       | 3.4 MB    | ################################################################################################################################################################################################ | 100% 
pandas-1.0.5         | 9.8 MB    | ################################################################################################################################################################################################ | 100% 
certifi-2020.6.20    | 159 KB    | ################################################################################################################################################################################################ | 100% 
conda-4.8.5          | 3.1 MB    | ################################################################################################################################################################################################ | 100% 
ca-certificates-2020 | 132 KB    | ################################################################################################################################################################################################ | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

I tried Anaconda Navigator but when I select "pandas" to be upgraded and click on "Apply" a window appears saying the following packages will be modified, but the window is empty. The Apply button in that window is disabled so I don't think it is doing anything: Screen shot of Anaconda Navigator not updating Pandas

I was able to upgrade to pandas 1.1.3 via pip:

% pip install pandas --upgrade
Collecting pandas
  Downloading pandas-1.1.3-cp38-cp38-macosx_10_9_x86_64.whl (10.1 MB)
     |████████████████████████████████| 10.1 MB 2.1 MB/s 
Requirement already satisfied, skipping upgrade: python-dateutil>=2.7.3 in /opt/anaconda3/lib/python3.8/site-packages (from pandas) (2.8.1)
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /opt/anaconda3/lib/python3.8/site-packages (from pandas) (2020.1)
Requirement already satisfied, skipping upgrade: numpy>=1.15.4 in /opt/anaconda3/lib/python3.8/site-packages (from pandas) (1.18.5)
Requirement already satisfied, skipping upgrade: six>=1.5 in /opt/anaconda3/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
Installing collected packages: pandas
  Attempting uninstall: pandas
    Found existing installation: pandas 1.0.5
    Uninstalling pandas-1.0.5:
      Successfully uninstalled pandas-1.0.5
Successfully installed pandas-1.1.3

I guess this is ok, not sure if my anaconda environment will now have lost its integrity in some way. I guess my question still stands, regarding the way to upgrade via anaconda/conda, or perhaps there is no difference and it is fine to mix anaconda/conda and pip commands. I really don't know.

FlyingTeller

Anaconda comes with a whole bunch of packages pre-installed. As such, they of course have interdependencies that sometimes also restrict that not the newest version of some package can be used. So in your case, you can see that when trying

conda update pandas

it gave you

Updating pandas is constricted by 

anaconda -> requires pandas==1.0.5=py38h959d312_0

Basically telling you that the pre-installed anaconda package bundle requires that pandas is at version 1.0.5 to function properly

When you do

conda install -c conda-forge pandas=1.1.0

then conda tries to disentangle all the requirements that led to 1.0.5 being installed previously and tries to find a way to get the version you required working. Since the list of packages that are pre-installed in your base enviroment is long (check conda list), this takes a long time (what you described as hanging) and will probably fail eventually.

I was able to upgrade to pandas 1.1.3 via pip:

This is because essentially, pip will "not care" about all the interdependencies of libraries that where pre-installed with anaconda

not sure if my anaconda environment will now have lost its integrity

As a summary:

  1. conda is convinced that at the current state 1.0.5 is the version needed for all packages to work properly
  2. with pip install you forcefully installed a different version

so yes, in principle you have now a state of inconsisten package dependencies caused by using pip install to upgrade a package that was previously managed by conda, which is something you should never do, see the anaconda website for details.

To avoid complications with pre-installed packages in your base env, you can instead create a new environment and freely install your required version in there:

  1. conda create -n <env-Name> pandas=1.1
  2. conda activate <env-Name>

This creates a virtual environment where only pandas is installed. Then you can conda install other packages as needed

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Conda install and update do not work also solving environment get errors

From Dev

Conda install and update do not work also solving environment get errors

From Dev

How do I install libsvm in a conda environment so that I can import svm in anaconda?

From Dev

How can I get "Ethernet controller: Qualcomm Atheros Device e0b1 (rev 10)" working under Linux?

From Java

How can I map True/False to 1/0 in a Pandas DataFrame?

From Dev

How can I get rid of eth0:1?

From Dev

How can I get rid of eth0:1?

From Dev

How can I get anything but NULL/0/1 from if(...,1,0)?

From Dev

update issue: I just want to update the past or future column to 0 or 1 depending on the date and I can't get it working, can anybody help me?

From Dev

How can I query 1=1 or 1=0 in mongo?

From Dev

How can I use conda to install pydot?

From Dev

How can I use Conda to install MySQLdb?

From Dev

How can I use conda to install pydotplus

From Dev

How can I install the latest Anaconda with wget

From Dev

How can I get the MAC address from a socket returned from gen_tcp:accept/1?

From Dev

Can I get a -1 exit code using C++ on mac?

From Dev

conda install -c conda-forge python-pdal Solving environment: | hangs when running windows 10

From Dev

How to install Anaconda in virtual environment of conda.

From Dev

Laravel 4 pagination - Can't get past page 1

From Dev

How can I install a macOS VM Guest under VirtualBox on a Mac host?

From Dev

How can I get baseadapter to start at a different position than 0 or 1

From Dev

Is there a way I can get a random number from 0 - 1 billion?

From Dev

Is there a way I can get a random number from 0 - 1 billion?

From Dev

readyState does not get past 1

From Dev

How can I install Git on FreeBSD after error code 1?

From Dev

How to get the records from the past 1 hour in psql

From Dev

How can I format 2 partitions in my hard drive so that I have 1 for Mac and 1 for PC

From Dev

How can I get Eclipse to scroll past the bottom of the document?

From Dev

How can I install keras using anaconda with mxnet backend

Related Related

  1. 1

    Conda install and update do not work also solving environment get errors

  2. 2

    Conda install and update do not work also solving environment get errors

  3. 3

    How do I install libsvm in a conda environment so that I can import svm in anaconda?

  4. 4

    How can I get "Ethernet controller: Qualcomm Atheros Device e0b1 (rev 10)" working under Linux?

  5. 5

    How can I map True/False to 1/0 in a Pandas DataFrame?

  6. 6

    How can I get rid of eth0:1?

  7. 7

    How can I get rid of eth0:1?

  8. 8

    How can I get anything but NULL/0/1 from if(...,1,0)?

  9. 9

    update issue: I just want to update the past or future column to 0 or 1 depending on the date and I can't get it working, can anybody help me?

  10. 10

    How can I query 1=1 or 1=0 in mongo?

  11. 11

    How can I use conda to install pydot?

  12. 12

    How can I use Conda to install MySQLdb?

  13. 13

    How can I use conda to install pydotplus

  14. 14

    How can I install the latest Anaconda with wget

  15. 15

    How can I get the MAC address from a socket returned from gen_tcp:accept/1?

  16. 16

    Can I get a -1 exit code using C++ on mac?

  17. 17

    conda install -c conda-forge python-pdal Solving environment: | hangs when running windows 10

  18. 18

    How to install Anaconda in virtual environment of conda.

  19. 19

    Laravel 4 pagination - Can't get past page 1

  20. 20

    How can I install a macOS VM Guest under VirtualBox on a Mac host?

  21. 21

    How can I get baseadapter to start at a different position than 0 or 1

  22. 22

    Is there a way I can get a random number from 0 - 1 billion?

  23. 23

    Is there a way I can get a random number from 0 - 1 billion?

  24. 24

    readyState does not get past 1

  25. 25

    How can I install Git on FreeBSD after error code 1?

  26. 26

    How to get the records from the past 1 hour in psql

  27. 27

    How can I format 2 partitions in my hard drive so that I have 1 for Mac and 1 for PC

  28. 28

    How can I get Eclipse to scroll past the bottom of the document?

  29. 29

    How can I install keras using anaconda with mxnet backend

HotTag

Archive