我試圖讓一個Django項目啓動並運行,並且我有Django運行,但是我遇到了python的virtualenv問題。Mac上的虛擬環境與python 3.4
這裏是我的錯誤(在終端打開此顯示出來)
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/Library/Frameworks/Python.framework/Versions/2.7/bin/python and that PATH is
set properly.
這裏是我的.bash輪廓看起來像:
# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
export WORKON_HOME=$HOME/.virtualenvs
source /Library/Frameworks/Python.framework/Versions/3.4/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=$WORKON_HOME
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
我非常新的命令行的東西和虛擬環境,所以我可能不知道我做錯了一些「明顯」的事情。謝謝。
試評'PATH =「/庫/框架/ Python.framework /版本/ 2.7/bin中:$ {PATH}'下一行 –
同樣的錯誤謝謝您的好意 – bwighthunter
你試過指定哪個你的Python版本想用'mkvirtualenv --python /path/to/python3.4 venv_name'? – bkaf