WrapSumden
WrapSumden

Reputation: 51

Can't install Spyder after installing Tensorflow and Keras

I'm struggling to install Spyder (5.1.5) after installing Keras and Tensorflow.

Here are the steps I have taken so far:

  1. Install Anaconda
  2. Within Anaconda Navigator create a new environment named 'tensorflow'
  3. Install tensorflow and keras within Anaconda Navigator in the 'tensorflow' environment.
  4. attempt to install Spyder from Anaconda Navigator in the 'tensorflow' environment. I get the following error message when I do this:

'spyder cannot be installed on this environment. Do you want to install the package in an existing environment or create a new environment?'

The other thing I've tried, from the Anaconda prompt:

  1. conda activate tensorflow (activate tensorflow environment)
  2. conda install spyder

I get the following error:

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. Solving environment: - Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort.

Thanks for any help!

Upvotes: 5

Views: 5312

Answers (3)

pthomaid
pthomaid

Reputation: 177

My solution was to install Spyder first in a clean environment and then use pip.

pip install tensorflow

which installed tensorflow.keras as well.

Upvotes: 0

ams
ams

Reputation: 1

I had the same problem, and the solutions here by Ikram and Ashwini resolved my issues. The key fix was that you need to create an environment with Python 3.7, not 3.8.

Upvotes: 0

user11530462
user11530462

Reputation:

On command prompt type

#Set Up Anaconda Environments
conda create --name tf python=3.8

#Activate the new Environment
source activate tf

#Install Tensorflow
conda install tensorflow

#Install Spyder
conda install spyder

#Launch Spyder
spyder

#Verify installation
import tensorflow 

Upvotes: 1

Related Questions