Found conflicts when installing Spyder in an environment with Tensorflow 2.5

Dear all,

I’m experiencing dependence conflicts when trying to install spyder in an environment that includes package tensorflow-gpu release 2.5 from conda pkgs/main channel.

conda environment is created as it shows conda info command:

 active environment : tf25
 active env location : C:\Users\MyUser\.conda\envs\tf25
        shell level : 2
        user config file : C:\Users\MyUser\.condarc
        populated config files : C:\Users\MyUser\.condarc
        conda version : 4.10.1
        conda-build version : 3.21.4
        python version : 3.8.8.final.0
        virtual packages : __cuda=11.2=0
                      __win=0=0
                      __archspec=1=x86_64

The enviroment includes only tensorflow-gpu 2.5 release and its dependencies

 C:\UsersMyUser>conda list
 # packages in environment at C:\Users\MyUser\.conda\envs\tf25:
 #
 # Name                    Version                   Build  Channel
 _tflow_select             2.1.0                       gpu
 abseil-cpp                20210324.2           hd77b12b_0
 absl-py                   0.13.0           py39haa95532_0
 aiohttp                   3.7.4            py39h2bbff1b_1
 astor                     0.8.1            py39haa95532_0
 astunparse                1.6.3                      py_0
 async-timeout             3.0.1            py39haa95532_0
 attrs                     21.2.0             pyhd3eb1b0_0
 blas                      1.0                         mkl
 blinker                   1.4              py39haa95532_0
 brotlipy                  0.7.0           py39h2bbff1b_1003
 ca-certificates           2021.5.25            haa95532_1
 cached-property           1.5.2                      py_0
 cachetools                4.2.2              pyhd3eb1b0_0
 certifi                   2021.5.30        py39haa95532_0
 cffi                      1.14.5           py39hcd4344a_0
 chardet                   3.0.4           py39haa95532_1003
 click                     8.0.1              pyhd3eb1b0_0
 coverage                  5.5              py39h2bbff1b_2
 cryptography              3.4.7            py39h71e12ea_0
 cudatoolkit               11.3.1               h59b6b97_2
 cudnn                     8.2.1                cuda11.3_0
 cython                    0.29.23          py39hd77b12b_0
 flatbuffers               2.0.0                h6c2663c_0
 gast                      0.4.0                      py_0
 giflib                    5.2.1                h62dcd97_0
 google-auth               1.32.0             pyhd3eb1b0_0
 google-auth-oauthlib      0.4.1                      py_2
 google-pasta              0.2.0                      py_0
 grpcio                    1.36.1           py39hc60d5dd_1
 h5py                      3.2.1            py39h3de5c98_0
 hdf5                      1.10.6               h7ebc959_0
 icc_rt                    2019.0.0             h0cc432a_1
 icu                       68.1                 h6c2663c_0
 idna                      2.10               pyhd3eb1b0_0
 importlib-metadata        3.10.0           py39haa95532_0
 intel-openmp              2021.2.0           haa95532_616
 jpeg                      9b                   hb83a4c4_2
 keras-preprocessing       1.1.2              pyhd3eb1b0_0
 krb5                      1.18.2               hc04afaa_0
 libcurl                   7.71.1               h2a8f88b_1
 libpng                    1.6.37               h2a8f88b_0
 libprotobuf               3.14.0               h23ce68f_0
 libssh2                   1.9.0                h7a1dbc1_1
 markdown                  3.3.4            py39haa95532_0
 mkl                       2021.2.0           haa95532_296
 mkl-service               2.3.0            py39h2bbff1b_1
 mkl_fft                   1.3.0            py39h277e83a_2
 mkl_random                1.2.1            py39hf11a4ad_2
 multidict                 5.1.0            py39h2bbff1b_2
 numpy                     1.20.2           py39ha4e8547_0
 numpy-base                1.20.2           py39hc2deb75_0
 oauthlib                  3.1.1              pyhd3eb1b0_0
 openssl                   1.1.1k               h2bbff1b_0
 opt_einsum                3.3.0              pyhd3eb1b0_1
 pip                       21.1.3           py39haa95532_0
 protobuf                  3.14.0           py39hd77b12b_1
 pyasn1                    0.4.8                      py_0
 pyasn1-modules            0.2.8                      py_0
 pycparser                 2.20                       py_2
 pyjwt                     2.1.0            py39haa95532_0
 pyopenssl                 20.0.1             pyhd3eb1b0_1
 pyreadline                2.1              py39haa95532_1
 pysocks                   1.7.1            py39haa95532_0
 python                    3.9.0                h6244533_2
 python-flatbuffers        1.12               pyhd3eb1b0_0
 requests                  2.25.1             pyhd3eb1b0_0
 requests-oauthlib         1.3.0                      py_0
 rsa                       4.7.2              pyhd3eb1b0_1
 scipy                     1.6.2            py39h66253e8_1
 setuptools                52.0.0           py39haa95532_0
 six                       1.16.0             pyhd3eb1b0_0
 snappy                    1.1.8                h33f27b4_0
 sqlite                    3.36.0               h2bbff1b_0
 tensorboard               2.5.0                      py_0
 tensorboard-plugin-wit    1.6.0                      py_0
 tensorflow                2.5.0           gpu_py39h7dc34a2_0
 tensorflow-base           2.5.0           gpu_py39hb3da07e_0
 tensorflow-estimator      2.5.0              pyh7b7c402_0
 tensorflow-gpu            2.5.0                h17022bd_0
 termcolor                 1.1.0            py39haa95532_1
 typing-extensions         3.10.0.0             hd3eb1b0_0
 typing_extensions         3.10.0.0           pyh06a4308_0
 tzdata                    2021a                h52ac0ba_0
 urllib3                   1.26.6             pyhd3eb1b0_1
 vc                        14.2                 h21ff451_1
 vs2015_runtime            14.27.29016          h5e58377_2
 werkzeug                  1.0.1              pyhd3eb1b0_0
 wheel                     0.35.1             pyhd3eb1b0_0
 win_inet_pton             1.1.0            py39haa95532_0
 wincertstore              0.2              py39h2bbff1b_0
 wrapt                     1.12.1           py39h196d8e1_1
 yarl                      1.6.3            py39h2bbff1b_0
 zipp                      3.4.1              pyhd3eb1b0_0
 zlib                      1.2.11               h62dcd97_4

When trying to install spyder, I receive a huge amount of dependency conflicts, as it starts like this

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:
  - attrs -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
  - brotlipy -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0']
  - cached-property -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7, 
    <3.8.0a0|>=3.5,<3.6.0a0']
   - gast -> python[version='>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']
   - grpcio -> python[version='>=2.7,<2.8.0a0']
   - h5py -> python[version='<3']
    - mkl_random -> python[version='>=2.7,<2.8.0a0']
    - pyasn1 -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0']
    - pyasn1-modules -> python[version='>=2.7,<2.8.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7, 
      <3.8.0a0|>=3.5,<3.6.0a0']
    - pycparser -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
    - pyopenssl -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5, 
      <3.6.0a0']
    - requests -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5, 
      <3.6.0a0']
    - requests-oauthlib -> python[version='>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|>=3.6, 
      <3.7.0a0']
    - rsa -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0']
    - werkzeug -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
    - wheel -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5, 
     <3.6.0a0']

Error log continues with a huge amount of dependencies conflicts. I’m afraid it doesn’t make sense to include in this posts.

I would appreciate any workaround to enjoy Spyder with tensorflow-gpu release 2.5

Kind regards.

1 Like

Hello,

I don’t know if you solve the issue, but I’m posting this for others who may have the same problem!

I created a new environment in Anaconda using the command :
(conda prompt) # conda create --name tf tensorflow-gpu
Then I got the same error rescribed before… when trying to install Spyder IDE !

THE SOLUTION
I managed to solve this issue by doing these steps:

  1. Create new anaconda environnement with python3.7 ONLY (I used Anaconda Navigator for this) => make sure to choose Python 3.7 ONLY !! => choose a name as ‘my_env’
  2. Go to Anaconda Prompt to install separately tensoflow first then spyder.
    So we need to navigate to the Python environnement that we created already (I named it my_env)
(base) # conda activate my_env
(my_env) # conda install tensorflow-gpu
(my_env) # conda install spyder

Once finished Spyder should work properly in the environment you installed it in.
Important Note:
Some packages may not be installed due to several reasons (connection problem for example…), So make sure all packages have been installed as 100% ! If not, then re-execute the same command to install all packages correctly !

Regards.
IKRAM

#setup Anaconda environment
conda create --name tf_gpu python=3.7
conda install spyder
#activate environment tf_gpu
source activate tf_gpu
#Install latest Tensorflow-gpu i.e., current latest version is 2.7.0 
tf_gpu$pip install tensorflow 
#verify the installation
tf_gpu$python
tf_gpu$import tensorflow as tf
tf_gpu$tf.__version__

Output
2.7.0

This didnt work for me. Spyder just wont install if Tensrflow is present in the environment either with conda or pip.