How to create some environments for tensorflow in anaconda?

前端 未结 2 1678
无人及你
无人及你 2021-01-28 11:25

Fairly new to python here, I need a couple of TensorFlow environments for anaconda (one is tf, while the other is an older version).

How do people usually do stuff like

相关标签:
2条回答
  • 2021-01-28 11:51

    I faced similar problem of no python in conda environment. This link contains necessary information to create and manage conda environment, https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

    The command, conda create -n myenv python=3.7 will create a new environment named myenv with python 3.7. It can be similarly deleted by using command, conda remove --name myenv --all.

    conda env list command will show list of created environments including base. conda activate myenv will activate the environment and now here in terminal tensorflow can be installed with pip using, pip install --upgrade tensorflow.

    Instructions for setting up tensorflow with conda environment also available here, https://www.tensorflow.org/install/pip

    GPU instructions here, https://www.tensorflow.org/install/gpu

    In pycharm selecting python interpreter from an existing conda environment will make all its package available.

    0 讨论(0)
  • 2021-01-28 12:09

    With your error,

    We prefer to use conda install <package> instead of pip install <package>

    0 讨论(0)
提交回复
热议问题