尝试更新我的 virtualenv 中的 python 安装或创建新的 virtualenv 时会发生这种情况:
[marcintustin@localhost oneclickrep]$ virtualenv --always-copy --clear --python=/usr/bin/python oneclickcosvirt/
Already using interpreter /usr/bin/python
Deleting tree oneclickcosvirt/lib/python2.7
Not deleting oneclickcosvirt/bin
New python executable in oneclickcosvirt/bin/python
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.10.1', 'console_scripts', 'virtualenv')()
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 821, in main
symlink=options.symlink)
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 956, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 1377, in install_python
shutil.copyfile(py_executable_base, full_pth)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'python'
[marcintustin@localhost oneclickrep]$
结果与上述一致。/usr/bin/python
存在并且工作得很好(它也是由 拾取的python which
)。这是什么原因?
编辑:使用 virtualenv 版本 1.10.1