我剛剛將Snow Leopard更新到Lion。然後我需要安裝virtualenv
和virtualenvwrapper
。我用於兩個easy_install
。 我還添加virtualenvwrapper設置我的.bash_profile文件如下:Mac OS X Lion上的Virtualenvwrapper錯誤
# virtualenvwrapper settings
export WORKON_HOME="~/virtualenvs"
source "/usr/local/bin/virtualenvwrapper.sh"
但採購時,我收到以下錯誤:
ERROR: Could not create temporary file name. Make sure TMPDIR is set.
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/Library/Frameworks/Python.framework/Versions/2.7/bin/python and that PATH is set properly.
感謝大家的幫助。
嗨Ned「蟒蛇人」Deily!非常感謝你的回答。 在你的回答之後,我想到了可能在查找幫助之前,我還需要更新我的Python安裝。所以,這樣做,在我的iMac全能工作如預期,而在我的MacBook不... ... :( 我,然後,你跟着你的智慧和固定它的話真的,真的很感謝你。 '/ usr/local/bin /'。在你的指令之後,它們在我的'$ VIRTUALENVWRAPPER_PYTHON'中(也就是說,我已經將它添加到我的'.bash_profile'文件中的'$ PATH') exaclty'distribute_setup.py' does?tnx –
最簡單的思考方式是每個Python實例都必須有自己的'easy_install' commnad。'distribute_setup.py'腳本爲Python實例安裝一個'easy_install'版本它正在運行。 –
再次感謝。希望能夠使用'virtualenv',我現在應該能夠在虛擬環境中直接更新到主要的Python版本,並且可以使用其他版本管理特定的庫。 作爲剛剛學習Python,我相信我們會再次見面,在此先感謝您的寶貴幫助。 –