2012-09-03 125 views
2

我最近丢失了硬盘,目前正在重建我的笔记本电脑(运行Mountain Lion)开发系统。今天下午我去安装virtualenvwrapper,遇到了一些让我无法安装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 

回答

0

此链接:

https://gist.github.com/3179227

(使用pythonbrew)似乎已暂时排序的问题,为我。我不想在组合中有另一个组件(pythonbrew),所以希望别人能够重视如何让virtualenv与ML很好地搭配。

4

的virtualenv现在使用分配不setuptools的

出口VIRTUALENV_DISTRIBUTE =真

+0

我expieriencing这也之前。你能详细说明什么时候应该设置这个变量吗? – Ztyx

9

什么p4tux

的virtualenv现在使用分配不setuptools的

export VIRTUALENV_DISTRIBUTE=true

您创建

virtualenv ENV 

环境或做

$ python virtualenv.py --distribute ENV 

virtualenv documentation