我想在遠程計算機上通過ssh設置python環境(沒有root權限)。我以下說明:無法設置virtualenv python:沒有模塊命名pip
下載的virtualenv腳本: 的wget -O /tmp/virtualenv.py https://raw.github.com/pypa/virtualenv/master/virtualenv.py
運行虛擬ENV腳本
python /tmp/virtualenv.py $HOME/pyenv/
這將在您的$ HOME空間的「pyenv」目錄中設置環境
-
如果你正在使用bash(我希望你做的)
- 更新環境
,那麼你應該增加:
. $HOME/pyenv/bin/activate
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ioa//lib:/usr/local/lib64
to your .bashrc
當我運行python/TMP/virtualenv.py $ HOME/pyenv /,我收到錯誤
New python executable in /home/lht26/pyenv/bin/python
Cannot find a wheel for setuptools
Cannot find a wheel for pip
Installing setuptools, pip, wheel...
Complete output from command /home/lht26/pyenv/bin/python - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
ImportError: No module named pip
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/tmp/virtualenv.py", line 2328, in <module>
main()
File "/tmp/virtualenv.py", line 713, in main
symlink=options.symlink)
File "/tmp/virtualenv.py", line 945, in create_environment
download=download,
File "/tmp/virtualenv.py", line 901, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/tmp/virtualenv.py", line 797, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/lht26/pyenv/bin/python - setuptools pip wheel failed with error code 1
我應該怎麼辦?
無論蟒蛇已安裝有沒有畫中畫,它看起來喜歡。它是哪個版本?爲什麼你不能使用安裝了python的系統? –
從我所瞭解的情況來看,安裝的python包太舊了,而且我仍然需要更多的包,所以建議使用虛擬環境。 –
是的,但你誤解了我的觀點。無法安裝Virtualenv,因爲系統上的Python沒有pip。我建議你試試Miniconda反正http://conda.pydata.org/miniconda.html –