我当前的 django 项目需要“virtualenv”。我可以安装它,请求的目录是用一些基本的子目录(bin、include、lib)创建的,但它会停止在让我猜测的错误消息上。所以我希望这里有人知道这个问题,可以帮忙吗?
下面是一些希望有用的控制台文本输出。
提前非常感谢!莉娜
问题描述:
电脑配置:MacOS 10.6.8(雪豹),Python 2.7。
1)创建虚拟环境:
Suesssauer:site-packages sss$ virtualenv --distribute /Users/sss/EclipseProjects/django-projects/DEV
New python executable in /Users/sss/EclipseProjects/django-projects/DEV/bin/python
Please make sure you remove any previous custom paths from your /Users/sss/.pydistutils.cfg file.
COMMENT: fyi – Contents of .pydistutils.cfg
>> [install]
>> install_lib = /Library/Python/$py_version_short/site-packages )
Installing distribute........................................done.
Installing pip....
Complete output from command /Users/sss/Ecli...DEV/bin/python -x
/Users/sss/Ecli...VEL/bin/easy_install /Library/Python/2.7/...pport/pip-1.1.tar.gz:
/Users/sss/EclipseProjects/django-projects/DEV/bin/python:
can't open file '/Users/sss/EclipseProjects/django-projects/DEV/bin/easy_install':
[Errno 2] No such file or directory
评论:这是真的,它不见了。但是手动复制它不是我的工作,不是吗?
...Installing pip...done.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv", line 8,
in <module> load_entry_point('virtualenv==1.7.2', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv.py", line 942, in main
never_download=options.never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 654, in install_pip
filter_stdout=_filter_setup)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1020, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/sss/Ecli...ork_DEVEL/bin/python -x /Users/sss/Ecli...VEL/
bin/easy_install /Library/Python/2.7/...pport/pip-1.1.tar.gz failed with
error code 2
不知道,文件“/Library/Python/2.7/site-packages/virtualenv_support/pip-1.1.tar.gz”确实存在(如果这是谈论的那个)!
2) 问题:检查 virtualenv 的安装——我是否必须考虑以下这些警告?
控制台输出:
Suesssauer:site-packages sss$ pip install virtualenv
Downloading/unpacking virtualenv
Downloading virtualenv-1.7.2.tar.gz (2.2Mb): 2.2Mb downloaded
Running setup.py egg_info for package virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing collected packages: virtualenv
Running setup.py install for virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing virtualenv script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Installing virtualenv-2.7 script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Successfully installed virtualenv
Cleaning up...