2

I lost my hope trying to resolve this. I had the 1.3.0 version of numpy installed and I need it to be the latest, so I updated it with:

pip install --upgrade numpy

which ended successfully. Then using print np.__version__ in my code I found out it's still 1.3.0 version. So then I uninstalled numpy with pip and tried to install it again using Matt Fenwick's answer there with:

pip install -v -v -v numpy

During the installation, which was successful, I got this:

Using version 1.8.0 (newest of versions: 1.8.0, 1.8.0, 1.7.1, 1.7.1, 1.7.0, 1.7.0, 1.6.2, 1.6.2, 1.6.1, 1.6.1, 1.6.0, 1.6.0, 1.5.1, 1.5.0, 1.4.1, 1.3.0)

In the /usr/local/lib/python2.6/dist-packages I also see correct package info for a newest version without a hint of 1.3.0.

But np.__version__ still gives me 1.3.0! Please help me!

Community
  • 1
  • 1
FrauHahnhen
  • 143
  • 2
  • 11
  • check the $PATH, type `which python`, use `virtualenv`...look up other threads on this topic: this is probably the most common question I see in the python forum – jpwagner Dec 05 '13 at 15:33
  • Where did `pip` install `numpy` to? What's your `PYTHONPATH`? And what's `np.__path__`? – jazzpi Dec 05 '13 at 15:34
  • @jazzpi they both are `/usr/bin/python2.6/dist-packages` – FrauHahnhen Dec 05 '13 at 15:45
  • @FrauHahnhen, your problem then is that you're importing from the `/usr/bin` installation but upgrading to `/usr/local/lib`. What do you get from `which pip`? – askewchan Dec 05 '13 at 15:47
  • @FrauHahnhen: If that's the case, you got some problems... Also, which two? – jazzpi Dec 05 '13 at 15:47
  • @jazzpi `PYTHONPATH` and `np.__path__`. @askewchan is right, I missaw the upgrating directory name... Must have gone blind in the end of the day. Thanks! – FrauHahnhen Dec 05 '13 at 15:56
  • Does that mean you've solved the problem, @FrauHahnhen? – askewchan Dec 05 '13 at 20:35

1 Answers1

-1

Check to see if your version is still 1.3.0 or not. Use this code:

import python
python.__version__

If it shows '1.3.0', you have to first delete the numpy package from:

virtualenv_name/lib/python2.7/site-packages

If you are using virtual environment and if you are installing numpy on core go to:

/usr/local/lib/python2.7/dist-packages/

Now download the latest numpy package by:

sudo pip install numpy==1.7.1 --upgrade

Now move this folder to the above mentioned place as according to the situation. It worked for me.

Hope this will work for you too.

Groovetrain
  • 3,315
  • 19
  • 23
ishan Kankane
  • 51
  • 1
  • 5