Skip to content Skip to sidebar Skip to footer

(easiest) Way To Use Python 3.6 And 3.7 On Same Computer?

I have Python 3.7 installed on my computer. I want to use tensorflow and just found out that it basically doesn't support 3.7, so I'd like to (also) install Python 3.6. Any suggest

Solution 1:

One of the recommended ways to have multiple python installations with differing libraries installed is to use Virtualenv. This gives you the possibility to have a specific python environment with it's own set of dependencies for each project you work on. This works not only for the dependencies, but also for different versions of python.

On top of that you can use Pipenv to manage the different virtualenvs. In a Pipfile you can describe your required python and it's dependencies which is used by Pipenv to manage a python env specific for your project.

Solution 2:

I found this to work after searching for a while. Here are the steps I followed to install an older python version alongside my standard one:

You'll normally find your new python install under /usr/local/bin. Now you can create a new virtualenv specifying the python version to use with:

  • virtualenv --python=python3.6 env3.6
  • Get into the virtualenv running the command source env3.6/bin/activate.
  • Install tensorflow with the classic pip3 install tensorflow
  • Profit

Post a Comment for "(easiest) Way To Use Python 3.6 And 3.7 On Same Computer?"