'Anaconda Solving Environment fails in New Environment
I'm trying to set up tensorflow-gpu on my local machine to train neural networks on my RTX 2070 super. Unfortunately, I get the issue of the environment failing to solve, even in a brand new environment.
I originally tried to install tensorflow-gpu directly through Anaconda, but even with cudnn and cudatoolkit installed, it wouldn't recognize the GPU. I think it may be time to jump ship for pytorch...
Error codes;
(base) C:\Users\Albert>conda install -c conda-forge cudnn
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solution 1:[1]
The packages you are trying to install may be conflicting with your already installed packages. Try to create a new environment for tensorflow with a minimal set of packages:
conda create --name tf python cudnn -c conda-forge
conda activate tf
You can then install other packages with either conda
or pip
in this new environment.
In general, I find that creating separate conda environments for different tasks or projects is a better way to use conda
The conda documentation has details about managing environments
Solution 2:[2]
It's might occour because of the version conflict, you can just uninstall the python version in the existing conda environment or simply create new Conda environment.
To Change the python version-latest on existing environment:
conda uninstall python
conda install python -y
To create a new conda env
conda create -n <env-name> python -y
conda activate <env-name>
To install conda use any of the following commands:
conda install -c conda-forge tensorflow
conda install -c conda-forge/label/broken tensorflow
conda install -c conda-forge/label/cf201901 tensorflow
conda install -c conda-forge/label/cf202003 tensorflow
reference: https://anaconda.org/conda-forge/tensorflow
Try cleaning conda cache-files in case of error
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 |