
Tensorflow Python 2.7 vs. Python 3.5: What is your setup? - noloblo
how do you switch back and forth between 2.7 and 3.5<p>I am tired of getting  2.7 library errors every time every time I try to run 3.5 project. What is your ideal set up how do you maintain python path for two different versions  of the language<p>Any thoughts advising best practices appreciated
======
sdsk8
Well, i am suprised nobody say a word about Pyenv:

[https://github.com/pyenv/pyenv](https://github.com/pyenv/pyenv)

You can use a lot of python versions, including pypy.

------
detaro
virtualenvs, and outside of those taking care to always have proper

    
    
        #!/usr/bin/env pythonX 
    

lines at the top.

~~~
noloblo
virtualenvs? can you please elaborate

~~~
mod
You're in for a treat.

[http://python-guide-pt-
br.readthedocs.io/en/latest/dev/virtu...](http://python-guide-pt-
br.readthedocs.io/en/latest/dev/virtualenvs/)

~~~
noloblo
How is this a treat not clear it's not straightforward and not obvious as to
how to switch back-and-forth between 2.7 and 3.5 why are there two dangling
versions

~~~
detaro
for projects you only use with one Python version, you have a virtualenv per
project, with the right version, and enable the virtualenv when you work on
that project. (or you only do that for the python version you use less, but
virtualenvs have more benefits than just managing python versions). If you
need to test something with two versions, you have one env per python version
and enable whichever one you need.

~~~
noloblo
How do you switch back-and-forth

~~~
mod
From the page I linked:

> To begin using the virtual environment, it needs to be activated:

> $ source my_project/bin/activate

------
anon1253
I use Anaconda, which supports different concurrent installs

------
thearn4
I use Python 3.6 in an Anaconda env

