简体   繁体   中英

iPython uses wrong version of numPy

I'm using Python 2.7.10 on my Mac OSX machine (Yosemite) and recently installed numpy using 'sudo pip install numpy' which I realise I probably shouldn't have now, but anyway since then I've been having issues with the versions of numpy that iPython thinks I'm using.

When I start iPython and import numpy, and print numpy.version.version, it says version 1.8.0rc1.

However when I try to do a:pip install numpy --upgrade it keeps saying it's the latest version. pip freeze | grep numpy This gives me numpy 1.13.3.

Now when I try to run Jupyter Notebook, it uses the same numpy version as iPython and complains it needs a newer version.

What do I need to do? I tried doing sudo easy_install numpy but it keeps saying it's the latest version.

Thanks for any help, sorry if this is a newbie question, tried searching for it but haven't come up with anything that helps.

You can install the latest version of numpy for Python 2.7

https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM