在我的 virtualenv 中安装 Theano
Issue installing Theano in my virtualenv
我正在尝试在 virtualenv 中安装 Theano:
(dnouri_tut)[xxx@xxx virtualenvs]$ pip install Theano
但我收到以下错误:
Installing collected packages: scipy, numpy, Theano
Running setup.py install for scipy
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 249, in <module>
setup_package()
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 237, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
Complete output from command /home/xxx/virtualenvs/dnouri_tut/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JcZ_Qe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3NhHj-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxx/virtualenvs/dnouri_tut/include/site/python2.6:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 249, in <module>
setup_package()
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 237, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
----------------------------------------
Command "/home/xxx/virtualenvs/dnouri_tut/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JcZ_Qe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3NhHj-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxx/virtualenvs/dnouri_tut/include/site/python2.6" failed with error code 1 in /tmp/pip-build-JcZ_Qe/scipy
我不想依赖任何系统包,所以我没有使用选项“--system-site-packages”来创建我的 virtualenv。
有人可以帮忙吗?
正如 user1615070 所指出的,在安装 Theano(不使用系统版本)之前,我只需要在我的 virtualenv 中安装 numpy 和 scipy。
更具体地说,Theano(至少版本 0.8)具有 specific command in its documentation。这是:
virtualenv --system-site-packages -p python2.7 theano-env
我正在尝试在 virtualenv 中安装 Theano:
(dnouri_tut)[xxx@xxx virtualenvs]$ pip install Theano
但我收到以下错误:
Installing collected packages: scipy, numpy, Theano
Running setup.py install for scipy
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 249, in <module>
setup_package()
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 237, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
Complete output from command /home/xxx/virtualenvs/dnouri_tut/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JcZ_Qe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3NhHj-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxx/virtualenvs/dnouri_tut/include/site/python2.6:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 249, in <module>
setup_package()
File "/tmp/pip-build-JcZ_Qe/scipy/setup.py", line 237, in setup_package
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
----------------------------------------
Command "/home/xxx/virtualenvs/dnouri_tut/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JcZ_Qe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-T3NhHj-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/xxx/virtualenvs/dnouri_tut/include/site/python2.6" failed with error code 1 in /tmp/pip-build-JcZ_Qe/scipy
我不想依赖任何系统包,所以我没有使用选项“--system-site-packages”来创建我的 virtualenv。
有人可以帮忙吗?
正如 user1615070 所指出的,在安装 Theano(不使用系统版本)之前,我只需要在我的 virtualenv 中安装 numpy 和 scipy。
更具体地说,Theano(至少版本 0.8)具有 specific command in its documentation。这是:
virtualenv --system-site-packages -p python2.7 theano-env