amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

Issue installing tensorflow

Open rainmanh opened this issue 7 years ago • 3 comments

Hi

I am trying to reach Airflow through the tensorflow module in SageMaker, so I have done:

conda install --yes --name JupyterSystemEnv  tensorflow

the output is :

## Package Plan ##

  environment location: /home/ec2-user/anaconda3

  added / updated specs:
    - tensorflow


The following packages will be UPDATED:

  certifi              pkgs/main::certifi-2018.11.29-py36_0 --> conda-forge::certifi-2018.11.29-py36_1000
  openssl              pkgs/main::openssl-1.0.2p-h14c3975_0 --> conda-forge::openssl-1.0.2p-h14c3975_1002

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2018.12.5-0 --> conda-forge::ca-certificates-2018.11.29-ha4d7672_0
  tensorboard        pkgs/main::tensorboard-1.12.2-py36he6~ --> conda-forge::tensorboard-1.10.0-py36_0
  tensorflow         pkgs/main::tensorflow-1.12.0-gpu_py36~ --> conda-forge::tensorflow-1.10.0-py36_0

The following packages will be DOWNGRADED:

  numpy                               1.14.3-py36hcd700cb_1 --> 1.14.2-py36hdbf6ddf_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: failed

RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.

Conda info

    active environment : None
       user config file : /home/ec2-user/.condarc
 populated config files : /home/ec2-user/.condarc
          conda version : 4.6.1
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : /home/ec2-user/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/ec2-user/anaconda3/pkgs
                          /home/ec2-user/anaconda2/pkgs
       envs directories : /home/ec2-user/anaconda3/envs
                          /home/ec2-user/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.1 requests/2.20.1 CPython/3.6.5 Linux/4.14.77-70.82.amzn1.x86_64 amzn/2018.03 glibc/2.17
                UID:GID : 500:500
             netrc file : None
           offline mode : False
    active environment : None
       user config file : /home/ec2-user/.condarc
 populated config files : /home/ec2-user/.condarc
          conda version : 4.6.1
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : /home/ec2-user/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/ec2-user/anaconda3/pkgs
                          /home/ec2-user/anaconda2/pkgs
       envs directories : /home/ec2-user/anaconda3/envs
                          /home/ec2-user/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.1 requests/2.20.1 CPython/3.6.5 Linux/4.14.77-70.82.amzn1.x86_64 amzn/2018.03 glibc/2.17
                UID:GID : 500:500
             netrc file : None
           offline mode : False    active environment : None
       user config file : /home/ec2-user/.condarc
 populated config files : /home/ec2-user/.condarc
          conda version : 4.6.1
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : /home/ec2-user/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/ec2-user/anaconda3/pkgs
                          /home/ec2-user/anaconda2/pkgs
       envs directories : /home/ec2-user/anaconda3/envs
                          /home/ec2-user/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.1 requests/2.20.1 CPython/3.6.5 Linux/4.14.77-70.82.amzn1.x86_64 amzn/2018.03 glibc/2.17
                UID:GID : 500:500
             netrc file : None
           offline mode : False    active environment : None
       user config file : /home/ec2-user/.condarc
 populated config files : /home/ec2-user/.condarc
          conda version : 4.6.1
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : /home/ec2-user/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/ec2-user/anaconda3/pkgs
                          /home/ec2-user/anaconda2/pkgs
       envs directories : /home/ec2-user/anaconda3/envs
                          /home/ec2-user/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.1 requests/2.20.1 CPython/3.6.5 Linux/4.14.77-70.82.amzn1.x86_64 amzn/2018.03 glibc/2.17
                UID:GID : 500:500
             netrc file : None
           offline mode : False

Any idea? A bit stuck at the moment .

rainmanh avatar Jan 29 '19 16:01 rainmanh

I am having a similar issue when trying to update scikit-learn

(python3) sh-4.2$ conda update scikit-learn
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: /home/ec2-user/anaconda3/envs/python3

  added / updated specs:
    - scikit-learn


The following NEW packages will be INSTALLED:

  numpy-base         pkgs/main/linux-64::numpy-base-1.15.4-py36hde5b4d6_0

The following packages will be UPDATED:

  ca-certificates    conda-forge::ca-certificates-2018.8.2~ --> pkgs/main::ca-certificates-2018.12.5-0
  certifi             conda-forge::certifi-2018.8.24-py36_1 --> pkgs/main::certifi-2018.11.29-py36_0
  libstdcxx-ng                             7.2.0-hdf63c60_3 --> 8.2.0-hdf63c60_1
  mkl                                            2018.0.2-1 --> 2019.1-144
  mkl-service                          1.1.2-py36h17a0993_4 --> 1.1.2-py36he904b0f_5
  mkl_fft                              1.0.1-py36h3010b51_0 --> 1.0.10-py36ha843d7b_0
  mkl_random                           1.0.1-py36h629b387_0 --> 1.0.2-py36hd81dba3_0
  numpy                               1.14.3-py36hcd700cb_1 --> 1.15.4-py36h7e9f1db_0
  scikit-learn                        0.19.1-py36h7aa7ec6_0 --> 0.20.2-py36hd81dba3_0
  scipy                                1.1.0-py36hfc37229_0 --> 1.2.0-py36h7c811a0_0

The following packages will be SUPERSEDED by a higher-priority channel:

  openssl            conda-forge::openssl-1.0.2p-h470a237_0 --> pkgs/main::openssl-1.0.2p-h14c3975_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: failed

RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.

eddies5 avatar Feb 04 '19 23:02 eddies5

I was able to solve my issue with pip install -U scikit-learn inside of my python3 conda env. I now see the latest scikit-learn version inside of my jupyter notebook.

eddies5 avatar Feb 05 '19 15:02 eddies5

Hi @rainmanh,

I apologize for the late response.

There is an open issue in conda repository 8149 related to this error. The only solution working for some is updating conda using conda update conda .

Could you trying this and if it doesn't work try restarting your SageMaker Notebook Instance.

Let us know if none of these works for you.

neelamgehlot avatar Feb 18 '19 23:02 neelamgehlot