我正在尝试使用django1.4配置virtualenvwrapper
。我正在关注this post并且正在努力做它在那里说的话:
Admin$ pip install virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/site-packages (from virtualenvwrapper)
Admin$ export WORKON_HOME=$HOME/.virtualenvs
Admin$ export PROJECT_HOME=$HOME/Users/Admin
Admin$ source /usr/local/bin/virtualenvwrapper.sh
/usr/bin/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 virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
Admin$ mkvirtualenv --python=python2.7 mynewenv
The executable /Users/Admin/python2.7 (from --python=/Users/Admin/python2.7) does not exist
任何人都可以帮我弄清楚如何在我的osx雪豹安装上设置virtualenvwrapper吗?非常感谢你的帮助!
答案 0 :(得分:0)
看起来你正在尝试使用python2.7,但你还没有告诉virtualenvwrapper。尝试在export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
之前添加source /usr/local/bin/virtualenvwrapper.sh
(假设您的python2.7安装位于其中) - 即
Admin$ export WORKON_HOME=$HOME/.virtualenvs
Admin$ export PROJECT_HOME=$HOME/Users/Admin
Admin$ export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
Admin$ source /usr/local/bin/virtualenvwrapper.sh