在山狮上安装virtualenvwrapper的问题

Joh*_*ter 2 pip setuptools virtualenv osx-mountain-lion

我最近丢失了硬盘,目前正在重建我的笔记本电脑(运行Mountain Lion)开发系统.今天下午我去安装virtualenvwrapper并遇到一些奇怪的事情阻止我安装virtualenvwrapper.

我做了以下事情:

  1. 已安装的设置工具.
  2. 使用easy_install-2.7安装pip.
  3. 使用pip-2.7安装虚拟环境.

当我使用pip-2.7安装virtualenvwrapper时,我得到以下内容(见下文).在-2.5,-2.6,-2.7后缀似乎是狮子山区新的东西吗?我尝试了没有后缀的相同过程,但这也没有用.

我发帖是因为我怀疑这里出现了一些重大问题,并希望在它成为一个更加阴险的问题之前找到它的底部.

我是否更好地下载并安装2.7的新版本,并设置我的路径来使用它?


Downloads  sudo pip-2.7 install virtualenvwrapper   
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Downloading/unpacking distribute (from stevedore->virtualenvwrapper)
  Downloading distribute-0.6.28.tar.gz (627kB): 627kB downloaded
  Running setup.py egg_info for package distribute

Installing collected packages: distribute
  Running setup.py install for distribute
    Before install bootstrap.
    Scanning installed packages
    Setuptools installation detected at /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg
    Egg installation
    Patching...
    Renaming /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg into /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg.OLD.1346705360.93
    Patched done.
    Relaunching...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    NameError: name 'install' is not defined
    Complete output from command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/tmp/pip-build/distribute/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RMDd1X-record/install-record.txt --single-version-externally-managed:
    Before install bootstrap.

Scanning installed packages

Setuptools installation detected at /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg

Egg installation

Patching...

Renaming /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg into /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg.OLD.1346705360.93

Patched done.

Relaunching...

Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'install' is not defined
Run Code Online (Sandbox Code Playgroud)

小智 9

什么p4tux

virtualenv现在使用分布式而不是setuptools

export VIRTUALENV_DISTRIBUTE=true

在创建环境之前

virtualenv ENV
Run Code Online (Sandbox Code Playgroud)

或者做

$ python virtualenv.py --distribute ENV
Run Code Online (Sandbox Code Playgroud)

请参阅virtualenv文档