side-by-side python 2 and python 3

61 views
Skip to first unread message

[w]

unread,
Dec 29, 2016, 11:15:42 AM12/29/16
to virtualenvwrapper
Hi, I'm a long time user of virtualenvwrapper and love it. Thanks to all those who help make it possible!

i'm starting to do side-by-side work in python2 and python3. (i.e. some projects req python 2 and some req python 3)

How do i use virtualenvwrapper with this requirement?

Do I just install one virtualenvwrapper (either for 2 or for 3) and just set the python binary accordingly at time of virtual env creation?


Jason Myers

unread,
Dec 29, 2016, 11:38:04 AM12/29/16
to [w], virtuale...@googlegroups.com
You can install virtualenvwrapper for which ever python you desire, and use it to create a virtualenv for whatever python you want at the time of creation. For example, mkvirtualenv --python=/path/to/python3 nameOfEnvironment would make a python3 virtualenv even if virtualenvwrapper was installed in python2.

Cheers,
Jason
--
You received this message because you are subscribed to the Google Groups "virtualenvwrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to virtualenvwrap...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[w]

unread,
Dec 29, 2016, 12:20:45 PM12/29/16
to virtualenvwrapper
awesome. thanks for the confirmation.

Carl Karsten

unread,
Dec 29, 2016, 12:23:54 PM12/29/16
to virtuale...@googlegroups.com, [w]
question: we need to maintain 2 VEs right? 
One for each python version.

so one requirements.txt but if we add a package we need to run both pip and pip3 to update each VE.





To unsubscribe from this group and stop receiving emails from it, send an email to virtualenvwrapper+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "virtualenvwrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to virtualenvwrapper+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Carl K

Jason Myers

unread,
Dec 29, 2016, 12:26:17 PM12/29/16
to virtuale...@googlegroups.com, Carl Karsten, [w]
Yes or use something like tox for multiple version testing
To unsubscribe from this group and stop receiving emails from it, send an email to virtualenvwrap...@googlegroups.com.

Jason Myers

unread,
Dec 29, 2016, 12:29:06 PM12/29/16
to virtuale...@googlegroups.com, Carl Karsten, [w]
Sorry sent that too soon, you need to activate the python2 environment and pip install in it, then activate the python3 environment and pip install in it as well.
Reply all
Reply to author
Forward
0 new messages