jupyter/jupyter.sh failed to install custom conda packages
When starting a dataproc cluster the initialization action jupyter/jupyter.sh failed today. We automatically start and stop dataproc clusters, so the same command that previously worked was.
Installing custom conda packages 'numpy pandas:scikit-learn:matplotlib)'
+ conda install 'numpy pandas scikit-learn matplotlib'
Solving environment: ...working... failed
PackagesNotFoundError: The following packages are not available from current channels:
- numpy==pandasscikit-learn=matplotlib
Because of this section from the output log I suspect it is either a problem with conda or something changed by the commit: https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/commit/0619d93278490eda18e74971e4e4b0b6c21c4c0e#diff-b99f25438cb001027a79a47790acd143R40 (jupyter.sh line 40)
Command to start the cluster:
gcloud dataproc clusters create censoredclustername --bucket=censored_staging-bucket --initialization-actions="gs://dataproc-initialization-actions/jupyter/jupyter.sh" --metadata="JUPYTER_PORT=8125,JUPYTER_CONDA_PACKAGES=numpy:pandas:scikit-learn:matplotlib" --zone=europe-west1-c --master-machine-type="n1-highmem-32" --num-workers=2 --worker-machine-type="n1-highmem-32" --num-preemptible-workers="4" --image-version="1.2"
Full output log:
++ /usr/share/google/get_metadata_value attributes/dataproc-role
+ readonly ROLE=Master
+ ROLE=Master
++ /usr/share/google/get_metadata_value attributes/INIT_ACTIONS_REPO
++ echo https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git
+ readonly INIT_ACTIONS_REPO=https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git
+ INIT_ACTIONS_REPO=https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git
++ /usr/share/google/get_metadata_value attributes/INIT_ACTIONS_BRANCH
++ echo master
+ readonly INIT_ACTIONS_BRANCH=master
+ INIT_ACTIONS_BRANCH=master
++ /usr/share/google/get_metadata_value attributes/JUPYTER_CONDA_CHANNELS
+ readonly JUPYTER_CONDA_CHANNELS=
+ JUPYTER_CONDA_CHANNELS=
++ /usr/share/google/get_metadata_value attributes/JUPYTER_CONDA_PACKAGES
+ readonly JUPYTER_CONDA_PACKAGES=numpy:pandas:scikit-learn:matplotlib
+ JUPYTER_CONDA_PACKAGES=numpy:pandas:scikit-learn:matplotlib
+ echo 'Cloning fresh dataproc-initialization-actions from repo https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git and branch master...'
Cloning fresh dataproc-initialization-actions from repo https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git and branch master...
+ git clone -b master --single-branch https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git
Cloning into 'dataproc-initialization-actions'...
+ ./dataproc-initialization-actions/conda/bootstrap-conda.sh
CONDA_INSTALL_PATH not set, setting ...
Set CONDA_INSTALL_PATH to /opt/conda
OS_TYPE not set, setting ...
Set OS_TYPE to Linux-x86_64.sh
MINICONDA_VARIANT not set, setting ...
Set MINICONDA_VARIANT to 3
MINICONDA_VERSION not set, Spark version >= 2.2.0, setting Miniconda version to latest ...
Complete Miniconda version resolved to: Miniconda3-latest-Linux-x86_64.sh
Working directory: /
No path argument specified, setting install directory as working directory: /.
Defined Miniconda script path: //Miniconda3-latest-Linux-x86_64.sh
Downloading Miniconda script to: //Miniconda3-latest-Linux-x86_64.sh ...
--2018-04-03 15:20:34-- https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
Resolving repo.continuum.io (repo.continuum.io)... 104.16.19.10, 104.16.18.10, 2400:cb00:2048:1::6810:130a, ...
Connecting to repo.continuum.io (repo.continuum.io)|104.16.19.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58304693 (56M) [application/x-sh]
Saving to: ‘Miniconda3-latest-Linux-x86_64.sh’
0K .......... .......... .......... .......... .......... 0% 5.67M 10s
50K .......... .......... .......... .......... .......... 0% 9.73M 8s
100K .......... .......... .......... .......... .......... 0% 25.5M 6s
[manually removed lines here for github issue]
56800K .......... .......... .......... .......... .......... 99% 284M 0s
56850K .......... .......... .......... .......... .......... 99% 303M 0s
56900K .......... .......... .......... ........ 100% 260M=0.5s
2018-04-03 15:20:35 (116 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [58304693/58304693]
Downloaded Miniconda3-latest-Linux-x86_64.sh!
-rw-r--r-- 1 root root 58304693 Feb 20 19:15 //Miniconda3-latest-Linux-x86_64.sh
Installing Miniconda3-latest-Linux-x86_64.sh to /opt/conda...
PREFIX=/opt/conda
installing: python-3.6.4-hc3d631a_1 ...
Python 3.6.4 :: Anaconda, Inc.
installing: ca-certificates-2017.08.26-h1d4fec5_0 ...
installing: conda-env-2.6.0-h36134e3_1 ...
installing: libgcc-ng-7.2.0-h7cc24e2_2 ...
installing: libstdcxx-ng-7.2.0-h7a57d05_2 ...
installing: libffi-3.2.1-hd88cf55_4 ...
installing: ncurses-6.0-h9df7e31_2 ...
installing: openssl-1.0.2n-hb7f436b_0 ...
installing: tk-8.6.7-hc745277_3 ...
installing: xz-5.2.3-h55aa19d_2 ...
installing: yaml-0.1.7-had09818_2 ...
installing: zlib-1.2.11-ha838bed_2 ...
installing: libedit-3.1-heed3624_0 ...
installing: readline-7.0-ha6073c6_4 ...
installing: sqlite-3.22.0-h1bed415_0 ...
installing: asn1crypto-0.24.0-py36_0 ...
installing: certifi-2018.1.18-py36_0 ...
installing: chardet-3.0.4-py36h0f667ec_1 ...
installing: idna-2.6-py36h82fb2a8_1 ...
installing: pycosat-0.6.3-py36h0a5515d_0 ...
installing: pycparser-2.18-py36hf9f622e_1 ...
installing: pysocks-1.6.7-py36hd97a5b1_1 ...
installing: ruamel_yaml-0.15.35-py36h14c3975_1 ...
installing: six-1.11.0-py36h372c433_1 ...
installing: cffi-1.11.4-py36h9745a5d_0 ...
installing: setuptools-38.4.0-py36_0 ...
installing: cryptography-2.1.4-py36hd09be54_0 ...
installing: wheel-0.30.0-py36hfd4bba0_1 ...
installing: pip-9.0.1-py36h6c6f9ce_4 ...
installing: pyopenssl-17.5.0-py36h20ba746_0 ...
installing: urllib3-1.22-py36hbe7ace6_0 ...
installing: requests-2.18.4-py36he2e5f8d_1 ...
installing: conda-4.4.10-py36_0 ...
installation finished.
Setting environment variables...
Updated PATH: /opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
And also HOME:
/opt/conda/bin/conda
active environment : None
user config file : /root/.condarc
populated config files : /root/.condarc
conda version : 4.4.10
conda-build version : not installed
python version : 3.6.4.final.0
base environment : /opt/conda (writable)
channel URLs : https://repo.continuum.io/pkgs/main/linux-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
package cache : /opt/conda/pkgs
/root/.conda/pkgs
envs directories : /opt/conda/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.4.10 requests/2.18.4 CPython/3.6.4 Linux/3.16.0-5-amd64 debian/8 glibc/2.19
UID:GID : 0:0
netrc file : None
offline mode : False
# conda environments:
#
base * /opt/conda
sys.version: 3.6.4 |Anaconda, Inc.| (default, Jan 16 ...
sys.prefix: /opt/conda
sys.executable: /opt/conda/bin/python
conda location: /opt/conda/lib/python3.6/site-packages/conda
conda-build: None
conda-env: /opt/conda/bin/conda-env
user site dirs:
CIO_TEST: <not set>
CONDA_ROOT: /opt/conda
PATH: /opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
WARNING: could not import _license.show_info
# try:
# $ conda install -n root _license
Updating global profiles to export miniconda bin location to PATH...
grep: /etc/profile.d/conda.sh: No such file or directory
Adding path definition to profiles...
export CONDA_BIN_PATH=/opt/conda/bin
export PATH=$CONDA_BIN_PATH:$PATH
Updating global profiles to export miniconda bin location to PATH and set PYTHONHASHSEED ...
Adding PYTHONHASHSEED=0 to profiles and spark-defaults.conf...
export PYTHONHASHSEED=0
Ensure that Anaconda Python and PySpark play nice by all pointing to same Python distro...
export PYSPARK_PYTHON=/opt/conda/bin/python
Finished bootstrapping via Miniconda, sourcing /etc/profile ...
+ source /etc/profile.d/conda.sh
++ export CONDA_BIN_PATH=/opt/conda/bin
++ CONDA_BIN_PATH=/opt/conda/bin
++ export PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export PYTHONHASHSEED=0
++ PYTHONHASHSEED=0
++ export PYSPARK_PYTHON=/opt/conda/bin/python
++ PYSPARK_PYTHON=/opt/conda/bin/python
+ '[' -n '' ']'
+ '[' -n numpy:pandas:scikit-learn:matplotlib ']'
+ echo 'Installing custom conda packages '\''numpy pandas:scikit-learn:matplotlib)'\'''
Installing custom conda packages 'numpy pandas:scikit-learn:matplotlib)'
+ conda install 'numpy pandas scikit-learn matplotlib'
Solving environment: ...working... failed
PackagesNotFoundError: The following packages are not available from current channels:
- numpy==pandasscikit-learn=matplotlib
Current channels:
- https://repo.continuum.io/pkgs/main/linux-64
- https://repo.continuum.io/pkgs/main/noarch
- https://repo.continuum.io/pkgs/free/linux-64
- https://repo.continuum.io/pkgs/free/noarch
- https://repo.continuum.io/pkgs/r/linux-64
- https://repo.continuum.io/pkgs/r/noarch
- https://repo.continuum.io/pkgs/pro/linux-64
- https://repo.continuum.io/pkgs/pro/noarch
Yeah, sorry about this. Closing as a duplicate of #234 . I've opened a PR to fix it: #239 . I'll update both issues when it's fixed.
Thanks for the fast reply and for the PR. Sorry I didn't catch the duplicate when I looked for a similar issue.
Alrighty, fixed!