Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple numpy version on Mac OS X

I am running Mac OS X 10.8.4.

Python 2.7 is installed by installing command line tools in Xcode.

Apple is managing a version of numpy (1.6.1) located at

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy

I use

sudo easy_install numpy 

to install a version (1.7.x). It is put at location

/Library/Python/2.7/site-packages

In python, when

import numpy

it actually imports the 1.6.1 one (managed by apple).

Howe can I choose the 1.7.x one installed by easy_install?

like image 482
reijz Avatar asked Dec 15 '25 16:12

reijz


1 Answers

Use == to specify the version:

easy_install numpy==1.6

I prefer pip:

easy_install pip
pip install numpy==1.6

EDIT: To make use of multiple installed versions of a package you could use virtualenv assuming you don't need multiple versions of the package within the same project

source

like image 176
Chris Montanaro Avatar answered Dec 17 '25 09:12

Chris Montanaro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!