2015-01-01 66 views
3

我試圖讓工作SciPy的在我的virtualenv但安裝它的唯一方法是使用apt-get和沒有安裝它爲我的虛擬ENV的方式。不退出弼包,所以我試圖複製文件夾 /usr/lib/python2.7/dist-packages/scipy/home/envs/conbert/lib/python2.7/site-packages但無效。有可能使工作scipy爲特定的環境?安裝python-SciPy的在virtualenv中

回答

2

你可以在你的virtualenv使用pip安裝scipy

pip install scipy 

pip應該安裝在安裝之前scipy所有必要的Python的依賴關係。

請注意,您可能必須安裝使用apt-get一些額外的非Python的依賴關係。如果有必要,這些將在安裝pip期間標記爲錯誤。可能的依賴關係可能包括BLAS,LAPACK,ATLAS,各種編譯器等。這些是否已經安裝將取決於您已經完成的系統。

+1

是的,我得到這個錯誤:'/ home/envs/conbert/bin/python -c「import setuptools,tokenize; __ file __ ='/ tmp/pip-build-T6tskd/scipy/setup.py'; exec (編譯(getattr(tokenize,'open',open)(__ file __).read().exc('\ r \ n','\ n'),__file__,'exec'))「install --record/tmp /pip-zLMMtw-record/install-record.txt --single-version-external-managed --compile --install-headers /home/envs/conbert/include/site/python2.7「failed with error code 1 in的/ tmp/PIP-集結T6tskd/scipy'但不知道什麼是依賴關係。 – EnZo

+1

@EnZo試試這個答案有些依賴http://stackoverflow.com/a/3865521/3005188 – Ffisegydd

+0

的確保你使用apt -get **當你在virtualenv **以外的時候,所以**不要**'sudo apt-get install ...'當你在venv中時,首先'去激活' – Ffisegydd