[英]virtualenvwrapper initialization error (
I am trying to set up virtualenv using virtualenvwrapper for my Django project following this guide: Django Tutorial .我正在尝试按照本指南使用 virtualenvwrapper 为我的 Django 项目设置 virtualenv: Django 教程。 However, after installing and writing,
但是,在安装和编写之后,
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
and trying to run source ~/.bash_profile, i kept getting no directory error.并尝试运行 source ~/.bash_profile,我一直没有目录错误。 I researched about this error and thought that the error kept coming up because I installed python3 with homebrew.
我研究了这个错误,并认为错误不断出现是因为我用自制软件安装了 python3。
Therefore, i changed VIRTUALENVWRAPPER_PYTHON directory to /usr/local/Cellar/python/3.6.4_4 virtualenvwrapper.sh.因此,我将 VIRTUALENVWRAPPER_PYTHON 目录更改为 /usr/local/Cellar/python/3.6.4_4 virtualenvwrapper.sh。
But now I am getting this error:但是现在我收到了这个错误:
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.
How can i reset the PATH so that I can use virtualenvwrapper?如何重置 PATH 以便我可以使用 virtualenvwrapper?
you can try it, add this to your .bashrc, it works for me 您可以尝试一下,将其添加到您的.bashrc中,它对我有用
export WORKON_HOME=$HOME/.virtualenvs 导出WORKON_HOME = $ HOME / .virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 导出VIRTUALENVWRAPPER_PYTHON = / usr / bin / python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv 导出VIRTUALENVWRAPPER_VIRTUALENV = / usr / local / bin / virtualenv
source /usr/local/bin/virtualenvwrapper.sh 源/usr/local/bin/virtualenvwrapper.sh
Install virtualenvwrapper using pip使用 pip 安装 virtualenvwrapper
sudo pip3 install virtualenvwrapper
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.