Specify mkvirtualenv's default Python version to install

35 views
Skip to first unread message

S.K.

unread,
Apr 2, 2019, 7:13:25 PM4/2/19
to virtualenvwrapper
So I had this in my `.bash_profile`:

PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"


And I thought that if I just change it to this:

PATH="/Users/myusername/.pyenv/versions/3.7.2/bin:${PATH}"


Then virtualenvwrapper should simply use this as the new "source" Python to use. But that issues a warning about the Python version not having any virtualenvwrapper hooks.

How can I change the *version* `mkvirtualenv` installs by default? Preferably this should be a one-time change.

Thanks. 

Doug Hellmann

unread,
Apr 3, 2019, 7:25:18 AM4/3/19
to S.K., virtualenvwrapper
virtualenv is installing python. I think the way to control what it does
by default is to use the version of python you want to install
virtualenv and then ensure that the wrappers use that virtualenv (either
by installing the wrappers with the same version of python, or by
setting VIRTUALENVWRAPPER_VIRTUALENV to point to it.

https://virtualenvwrapper.readthedocs.io/en/latest/install.html#python-interpreter-virtualenv-and-path

--
Doug
Reply all
Reply to author
Forward
0 new messages