How to definitely install virtualenvwrapper with Python3.5 on Mac OS Sierra?

三世轮回 提交于 2019-12-04 06:23:00

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!