Sifa Wangia
Sifa Wangia

Reputation: 15

How do I upgrade pandas using Anaconda?

I'm using Python 2.7 with pandas version 0.14.1 which I installed with Anaconda and the book I'm reading instructed me to upgrade my pandas version to 0.16.0 (which is supported by Python 2.7) by typing:

conda install pandas=0.16.0

When I type this command in the Anaconda prompt a series of packages pop up:

The following NEW packages will be INSTALLED:

chardet:                3.0.4-py27_1003
conda-package-handling: 1.6.0-py27h3cc03e0_0
pysocks:                1.7.1-py27_0
tqdm:                   4.47.0-py_0
urllib3:                1.25.7-py27_0
win_inet_pton:          1.1.0-py27_0

The following packages will be UPDATED:

certifi:                2016.2.28-py27_0                --> 2019.11.28-py27_0
conda:                  4.3.30-py27he817781_0           --> 4.8.3-py27_0
conda-env:              2.6.0-0                         --> 2.6.0-1
futures:                2.1.6-py27_0          <unknown> --> 3.3.0-py27_0
menuinst:               1.4.7-py27_0                    --> 1.4.16-py27h0c8e037_1
pandas:                 0.14.1-np19py27_0     <unknown> --> 0.16.0-np19py27_1
pycosat:                0.6.1-py27_0          <unknown> --> 0.6.3-py27h0c8e037_0
requests:               2.14.2-py27_0                   --> 2.24.0-py_0

Why is pandas 0.16.0 unknown? Once I type 'y' to install/upgrage these packages, an error occurs and pandas isn't upgraded.

InsecurePlatformWarning pandas-0.16.0- 100% |###############################| Time: 0:00:00 5.96 MB/s ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'defaults::tqdm-4.47.0-py_0'. CondaError: Cannot link a source that does not exist. C:\Users\Username\Anaconda\Scripts\conda.exe

What does this error mean and how can I fix it? Also is there any other way to upgrade pandas through Anaconda?

Upvotes: 0

Views: 2570

Answers (1)

Akshay Sehgal
Akshay Sehgal

Reputation: 19307

Python 2.7 is unsupported now.

The Python core team plans to stop supporting Python 2.7 on January 1st, 2020. In line with NumPy's plans, all pandas releases through December 31, 2018 will support Python 2. The final release before December 31, 2018 will be the last release to support Python 2.

Maybe that’s why a higher version of pandas is not recognised. You can try -

pip3 install --upgrade pandas
#or
conda upgrade pandas

Unless it’s absolutely necessary I would recommend uninstalling your version of anaconda and reinstalling anaconda3.

Upvotes: 2

Related Questions