[SciPy-User] How to install scipy in virtualenv+python3+unbuntu12.04?

Andreas Hilboll lists at hilboll.de
Wed Nov 20 17:19:03 EST 2013


On 20.11.2013 23:15, zzzhhh wrote:
> Thomas Kluyver <takowl <at> gmail.com> writes:
> 
>>
>>
>>
>> On 20 November 2013 03:39, Evgeni Burovski <evgeny.burovskiy <at> 
> gmail.com> wrote:An easy trick is to first install it system-wide using apt-
> get to satisfy non-python dependencies, then install it manually in 
> virtualenv, run the test suite to make sure it works all right. After that 
> apt-get remove packages installed in step one.
>>
>>
>>
>>
>> You probably want to 'apt-get build-dep python3-scipy', rather than 
> simply installing it. That will install the packages required to compile 
> it, whereas installing it will only get runtime dependencies.
>>
>> Thomas
>>
>>
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User <at> scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
> 
> Thank you, but, after excuting the following commands (in order) in 
> virtualenv:
> 
> sudo apt-get install python3-scipy
> sudo apt-get build-dep python3-scipy
> sudo pip install scipy
> 
> , I did successfully installed scipy because I was told "Successfully 
> installed scipy". But in python3, when I input "import scipy", an error 
> says "ImportError: No module named scipy". Could you please tell me if I 
> missed something? Should I apt-get remove the global package? Thanks a lot!
> 
> Heng
> 
> 
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
> 

Don't do "sudo pip install scipy". Do "pip install scipy" within the
virtualenv (i.e. after executing "source /path/to/venv/bin/activate". If
you call "sudo pip install scipy", the root user executes "pip install
scipy", and the root user doesn't have the virtualenv enabled.

Cheers, Andreas.




More information about the SciPy-User mailing list