5

I am trying to set up virtualenv using virtualenvwrapper for my Django project following this guide : Django Tutorial. 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. I researched about this error and thought that the error kept coming up because I installed python3 with homebrew.

Therefore, i changed VIRTUALENVWRAPPER_PYTHON directory to /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?

2 Answers 2

14

You can try it, add this to your ~/.bashrc, it works for me

export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
Sign up to request clarification or add additional context in comments.

1 Comment

For me, I didn't need to set the VIRTUALENVWRAPPER_VIRTUALENV variable.
1

Install virtualenvwrapper using pip

sudo pip3 install virtualenvwrapper

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.