2012-09-03 123 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