我正在尝试使用virtualenvwrapper为我的Django项目设置virtualenv,遵循以下指南:Django教程。然而,在安装和编写之后,
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
并试图运行source ~/.bash_profile,我一直没有得到目录错误。我研究了这个错误,并认为错误不断出现,因为我安装了python3与homebrew。
因此,我将VIRTUALENVWRAPPER_PYTHON目录更改为/usr/local/Cellar/python/3.6.4_4虚拟环境 Package 器. sh。
但现在我得到这个错误:
virtualenvwrapper_run_hook:12: permission denied: /usr/local/Cellar/python/3.6.4_4
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=/usr/local/Cellar/python/3.6.4_4 and that PATH is
set properly.
如何重置PATH以便使用virtualenvwrapper?
2条答案
按热度按时间jk9hmnmh1#
你可以试试,把这个加到你的
~/.bashrc
上,它对我很有效luaexgnf2#
使用pip安装virtualenvrapper