Conda install tensorflow - Unsatisfiable error [duplicate] - tensorflow

This is the error :
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- numba -> numpy[version='>=1.14,<1.15.0a0']
- tensorflow
Use "conda info " to see the dependencies for each package.

You have to run the conda info tensorflow and conda info numba to see each dependencies for each package and then you have to install those package like conda install package=version to fix the problem.

First create a conda environment if you would like using
conda create -n my_env python=3.6
Here "my_env" is the name of my environment
Then activate your environment using
source activate my_env #(for mac)
conda activate my_env #(for windows)
Once the Environment is active. you can now install the packages you need as follows:I am showing you the packages which i work upon on virtual environment and this will take care of most of your dependencies
conda update conda
conda upgrade conda
conda upgrade anaconda
conda update numpy
conda install tensorflow
Hope this will solve your problem or else try to upgrade numpy using pip:
pip install --upgrade numpy

Related

'conda install tensorflow-gpu' is not installing any CUDNN libraries

When I run conda install tensorflow-gpu in a new venv, conda gives the list of packages that it will install, but there are no CUDNN or cudatoolkit packages which I would expect, and that other people have. I am expecting an output like in this question (Is it still necessary to install CUDA before using the conda tensorflow-gpu package?
) but instead I get this:
Edit: I was able to get it to work by running this command instead
conda create -n tf-gpu python=3.7 anaconda followed by
conda install tensorflow-gpu
After doing this it installed all the cudnn libraries on its own and I was able to run tensorflow with GPU. However, for some reason it is installing tensorflow 1.14, and I need 2.x so does anyone know why this is?
conda install tensorflow-gpu install only gpu version of Tensorflow and not supporting packages such as CUDA and cuDNN.
Follow steps to install
conda install cudatoolkit=10.0.130
conda install cudnn=7.6.0=cuda10.0_0
conda install tensorflow-gpu

Anaconda install keras-tuner in tensorflow environment

I am using Anaconda 3 and would like to install keras-tuner in the tensorflow environment.
I've tried
conda install -c conda-forge keras-tuner
in the Anaconda Prompt (see https://anaconda.org/conda-forge/keras-tuner) which worked fine. However, the package has been installed in the base environment (and not in the tensorflow environment).
How can I choose the environment in which I want to install keras-tuner?
I use tensorflow 2.1.0 on a Windows machine
There are multiple ways of doing it.
activating the target environment and running the same command.
You can install a conda package also without activating the environment. Just use
conda install -n <env_name> <package> or conda install -p <path/to/env> <package>

What's the minimal conda environment build for pandas?

I'm using Miniconda 3, and I'm trying to build a minimal Conda environment containing pandas. However, when I try to load the pandas module, Jupyter gives me the following error:
The kernel appears to have died. It will restart automatically.
When doing the same thing via Python in the Terminal, Python crashes.
I have created a minimal Conda environment, which can be reproduced via the code below.
conda create -n testenv
conda activate testenv
conda install python
conda install pandas
conda install jupyter
The problem doesn't occur anymore when I follow up with a full Anaconda install, via conda install anaconda.
Any ideas as to how this problem can be resolved without installing Anaconda?
I figured out what the problem was. What I should have mentioned is that I built a global channel list according to Bioconda recommendation, using
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
This makes conda-forge the highest-priority channel. For reasons I don't understand, conda-forge builds a dependency hell. (I noticed the guys at conda-forge: https://github.com/conda-forge/pandas-feedstock/issues/63).
For now, install using conda install -c defaults pandas.

conda install -c conda-forge tensorflow just stuck in Solving environment

I am trying to run this statement in MacOS.
conda install -c conda-forge tensorflow
It just stuck at the
Solving Environment:
Never finish.
$ conda --version
conda 4.5.12
Nothing worked untill i ran this in conda terminal:
conda upgrade conda
Note that this was for poppler (conda install -c conda-forge poppler)
On win10 I waited about 5-6 minutes but it depends of the number of installed python packages and your internet connection.
Also you can install it via Anaconda Navigator
One can also resolve the "Solving environment" issue by using the mamba package manager.
I installed tensorflow-gpu==2.6.2 on Linux (CentOS Stream 8) using the following commands
conda create --name deeplearning python=3.8
conda activate deeplearning
conda install -c conda-forge mamba
mamba install -c conda-forge tensorflow-gpu
To check the successful usage of GPU, simply run either of the commands
python -c "import tensorflow as tf;print('\n\n\n====================== \n GPU Devices: ',tf.config.list_physical_devices('GPU'), '\n======================')"
python -c "import tensorflow as tf;print('\n\n\n====================== \n', tf.reduce_sum(tf.random.normal([1000, 1000])), '\n======================' )"
References
Conda Forge blog post
mamba install instead of conda install
The same error happens with me .I've tried to install tensorboard with anaconda prompt but it was stuck on the environment solving .So i've added these paths to my environment variables:
C:\Anaconda3
C:\Anaconda3\Library\mingw-w64\bin
C:\Anaconda3\Library\usr\bin
C:\Anaconda3\Library\bin
C:\Anaconda3\Scripts
and it worked well.
Follow the instruction by nekomatic.
I left it running for 1 hour. Yes. it is finally finished.
But now I got the conflicts
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda==2018.12=py37_0 -> bleach==3.0.2=py37_0
- anaconda==2018.12=py37_0 -> html5lib==1.0.1=py37_0
- anaconda==2018.12=py37_0 -> numexpr==2.6.8=py37h7413580_0
- anaconda==2018.12=py37_0 -> scikit-learn==0.20.1=py37h27c97d8_0
- tensorflow
Use "conda info <package>" to see the dependencies for each package.

Conda closes automatically after installing tensorflow

I tried to install tensorflow with following steps:
conda create --name tensorflow python=3.5
activate tensorflow
conda install jupyter
conda install scipy
pip install tensorflow-gpu
As soon as I installed, conda shuts down immediately. I am using 64 bit windows and Anaconda 3.5. Please help
You should use conda to install tensorflow. Pip often causes problems.
conda install -c conda-forge tensorflow
Have a look to these steps to install first CPU version: Permission denied when installing Tensorflow