1

I installed additional python 2.7 on my mac and numpy-1.6.2 for python 2.7, however whenever I want to import numpy, it will import the numpy from the preinstalled python version on my Mac, the version is 1.6.1, can anybody tell me how can I change the import direction to numpy-1.6.2??

2 Answers 2

2

You must ensure that the library you've just installed and you're trying to import is in your PYTHONPATH. Also, doing things like that are not most optimal - consider using virtualenv and installing your libraries on per project basis to avoid issues like that and getting a lot more flexibility in managing them.

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

Comments

0

Check the path of your numpy package:

import numpy
print numpy.__path__

and then replace the entire contents with the downloaded numpy version 1.6.2, if the stuff in the resulting path looks similar to the numpy 1.6.2 download.

Otherwise just delete that stuff (that's in the path) or uninstall it and remove it through some other way and then use:

pip install numpy

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.