Well, looking around here there are tons of questions about how to correctly installing virtualenvwrapper on Mac. I really tried all of them but for no avail. I've noticed the previous questions don't have the configuration like my computer, so here it is:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
python3 get-pip.py
command to install pip
correctly, as I thinksudo pip3 virtualenvwrapper
to be sure all settings will be done as they should~/.bash_profile
with the code below:
export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/projects source /usr/local/bin/virtualenvwrapper.sh
Then, whenever I open a new fresh Terminal, I got this:
/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 virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly.
I've tried the fixes from others questions, to no avail:
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
on virtualenvwrapper.shVIRTUALENVWRAPPER_PYTHON="$(command \which python3)"
on virtualenvwrapper.shln -fs /Library/Frameworks/Python.framework/Versions/3.5/bin/python3 /usr/local/bin/python3
alias python=/usr/local/bin/python3
Well, looking forward to anyone with a configuration like mine to see what I'm doing wrong.
This is pretty old, but posting this because I came here from google and finally figured out the right paths.
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
export PROJECT_HOME=$HOME/Devel
source /Library/Frameworks/Python.framework/Versions/3.6/bin/virtualenvwrapper.sh
You have to make sure to have the actual python executable. This can be found by just simply browsing in Finder through to /bin and seeing what is there.
Well, after a lot of effort, I've decided to install pip
and virtualenvwrapper
on Python 2.7 shipped in macOS Sierra.
After that, I wrote the lines below on .bash_profile
. Maybe there's something redundant here but, it works.
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents/Projects/
ln -fs /Users/myusername/Library/Python/2.7/bin/virtualenvwrapper.sh /usr/local/bin/virtualenvwrapper.sh
ln -fs /Users/myusername/Library/Python/2.7/bin/virtualenv /usr/local/bin/virtualenv
source /usr/local/bin/virtualenvwrapper.sh
After that, I've installed Python 3.5.2 from python.org and created a new enviroment pointing to it and everything is working just fine.
mkvirtualenv --python=python3.5 env_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With