Windows solves the installation of TensorFlow in dual python versions under anaconda

Windows solves the installation of TensorFlow in dual python versions under anaconda

First, the installation of dual versions of anaconda:

The previously installed version is python2.7, and the installation of TensorFlow only supports version 3.5. But I don't want to abandon my original 2.7 version. So install dual versions;

Download version 2.7 and 3.5 from anaconda's official website;

Install one of them first, I want to install 2.7. All the way to next.

The point is, the process of installing version 3.5 is as follows:

1. The version I downloaded is Anaconda3-4.3.1-Windows-x86_64. Download address: https://repo.continuum.io/archive/

2. The installation process is similar to that of anaconda2, but the installation path should be set in the envs folder of anaconda2, and it should be named differently. I named it py3.

The difference in the installation process is shown in the following figure:

  Uncheck the tick in front of these two options, then it means not to add anaconda3 to the path, nor to set it as the default python version.

3. Here comes the point,

Enter cmd, we can see that python --version shows python 2.7. We need to activate the version 3.5, command: activate py3

deactivate 3.5: deactivate py3

4. To install TensorFlow, simply pip install TensorFlow:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326069235&siteId=291194637