I'm trying making work scipy in my virtualenv but the only way to install it is with apt-get and there is not a way to install it for my virtual env. Doesn't exits a package for pil, so i tried copy the folder
/usr/lib/python2.7/dist-packages/scipy
to /home/envs/conbert/lib/python2.7/site-packages
but is not working. Is possible make work scipy for a specific environment?
Asked
Active
Viewed 9,267 times
5

Enzo
- 4,111
- 4
- 21
- 33
1 Answers
4
You can install scipy
using pip
in your virtualenv with
pip install scipy
pip
should install all Python dependencies necessary before installing scipy
.
Note that you may have to install some extra non-Python dependencies using apt-get
. These will be flagged as errors during the pip
installation if they're necessary. Possible dependencies may include BLAS, LAPACK, ATLAS, various compilers, etc. Whether these are already installed will depend on what you've already done with your system.

Ffisegydd
- 51,807
- 15
- 147
- 125
-
1Yes, I am getting this error: `/home/envs/conbert/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-T6tskd/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zLMMtw-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/envs/conbert/include/site/python2.7" failed with error code 1 in /tmp/pip-build-T6tskd/scipy` but not sure what are the dependencies. – Enzo Jan 01 '15 at 17:17
-
1@EnZo try this answer for some of the dependencies http://stackoverflow.com/a/3865521/3005188 – Ffisegydd Jan 01 '15 at 17:18
-
Make sure you install using apt-get **when outside of your virtualenv** though. So **don't** do `sudo apt-get install ...` when you're in a venv, `deactivate` first. – Ffisegydd Jan 01 '15 at 17:19
-
7@Ffisegydd `sudo apt-get` inside a **virtualenv** is fine. Virtualenvs only change local python environment variables, whereas `apt-get` always operates on a system level. – Damien Ayers Feb 08 '16 at 23:51