Problems encountered in configuring tensorflow1.15 version: conda environment management/tensorflow historical version download/how to use the virtual environment in conda in pycharm

0. Foreword:

  • When I was doing configuration environment or operations that I didn’t understand, I always encountered problems and just searched on csdn or the Internet. After solving the problems, I didn’t know what knowledge I searched during the period. I can't remember some modifications, which makes me very worried that the environment I finally set up will collapse, and then search again, which is very troublesome. And sometimes the methods and answers given by others are completely inapplicable to my question. For example, someone in csdn said that the command to create a new conda virtual environment is: "conda create -name virtual environment name python=python in the virtual environment version, and then I will keep reporting errors when I write this way, and it will not be installed until I change -name to -n. So I decided to record every configuration problem I encountered.

1. View the conda virtual environment list:

  • Enter in Anaconda Prompy: conda env list

2. Create a conda virtual environment:

  • Enter in Anaconda Prompy: conda create -n the name of the virtual environment python=the version of python in the virtual environment

3. Rename the conda virtual environment:

  • Enter in Anaconda Prompy:
    • 1. Create a new environment and clone the original environment at the same time: conda create -n new name --clone the name of the old environment
    • 2. Delete the original environment: conda remove -n name of the old environment --all
    • Note: This method has a problem that it is slow!

4. Delete the original environment:

  • 1. Enter in Anaconda Prompy: conda remove -n the name of the python virtual environment to be deleted --all
  • 2. Enter in Anaconda Prompy: conda env remove -n the python virtual environment name to be deleted
  • Note: Do not delete the current virtual environment under the current virtual environment! ! ! ! !

5. Download historical version of tensorflow:

  • 1. Download the corresponding historical version compression package from tensorflow official website, and then install it manually
  • 2. Download the source code of a specific version from TensorFlow's GitHub repository, and manually build and install the corresponding version according to the compilation guide provided by TensorFlow
  • 3. Install third-party libraries: I chose this way
    insert image description here
    • In the corresponding virtual environment, download the grpcio library:
      • pip install --no-cache-dir --force-reinstall -Iv grpcio==1.8.6
    • In the corresponding virtual environment, download the corresponding version of the tensorflow library:
      • pip install tensorflow==1.15.0 -i https://pypi.douban.com/simple/

6. Configure the virtual environment in conda in pycharm:

  • chatgpt replied:
    insert image description here

Guess you like

Origin blog.csdn.net/sz1125218970/article/details/131568478