3

I am using anaconda 3. When I try to import pandas I receive the following message:

ImportError: this version of pandas is incompatible with numpy < 1.15.4 your numpy version is 1.15.3. Please upgrade numpy to >= 1.15.4 to use this pandas version

Printing numpy.__path__ gives me the following

['C:\Users\andrei\AppData\Roaming\Python\Python37\site-packages\numpy']

In conda list, my numpy version is 1.19.1. I checked the above directory to find that it has only numpy 1.15.3 inside and nothing else. Spyder is using this path instead of the anaconda's path to numpy for some arcane reason.

2
  • What's numpy.__version__? Commented Sep 2, 2020 at 18:59
  • I had this frustrating problem too, and I either deleted the whole Python37 folder, or removed it from PATH. I don't remember. Commented Sep 2, 2020 at 22:55

3 Answers 3

2

Looks like you have somehow installed several versions of NumPy. Try to remove them all by running several times conda remove numpy and pip uninstall numpy. If you have two versions, the corresponding uninstall command needs to be run twice. After these, install a fresh version of NumPy conda install numpy

You can verify if you still have a version of NumPy installed

conda list | grep numpy
pip list | grep numpy

Note that these commands show only one version number even if you have several copies installed.

Sign up to request clarification or add additional context in comments.

Comments

0

You can use conda to upgrade to upgrade your numpy. Run this command in the terminal:

conda update numpy

Comments

0

You need to remove this directory

C:\Users\andrei\AppData\Roaming\Python\

to fix this problem. It seems at some point you used pip to install numpy and that's interfering with the packages installed by conda (which is reporting the right version, as you said).

Furthermore, please be aware that pip and conda packages are binary incompatible, so you should avoid as much as possible to mix them.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.