Install conda package from Google Datalab

I want to use the ospc taxcalc package on a Google Datalab laptop. This package must be installed through conda.

Datalab does not have conda by default, so this method (from https://stackoverflow.com/questions/1233878/ ... ) does not work:

 %%bash conda install -c ospc taxcalc 

Installing via pip also does not work:

 %%bash pip install conda conda install -c ospc taxcalc 

ERROR. The installation method you used for conda โ€” perhaps either pip install conda or easy_install conda โ€” is not compatible with conda as an application. If you intend to install conda as a standalone application, the currently supported installation methods include the Anaconda installer and the miniconda installer. You can download the miniconda installer from https://conda.io/miniconda.html .

Following this url, I tried this:

 %%bash wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh bash Miniconda2-latest-Linux-x86_64.sh 

wget works, but the bash installation command is simply kept in the "Run ..." state for seemingly infinity.

This seems to be related to the conda installer with a request for a few keystrokes of Enter to check the license, and then for yes , indicating acceptance of the license terms. So, the conda silent installation looked promising:

 %%bash bash Miniconda2-latest-Linux-x86_64.sh -u -b -p $HOME/miniconda 

This triggered the following warning:

A WARNING. You currently have the PYTHONPATH environment variable set. This may lead to unexpected behavior when starting the Python interpreter in Miniconda2. For best results, make sure your PYTHONPATH only points to package directories that are compatible with the Python interpreter in Miniconda2: / content / miniconda

And does not provide the conda command:

 %%bash conda install -c ospc taxcalc 

bash: line 1: conda: command not found

0
source share
2 answers

Waiting for a problem with github, this work is being monitored - https://github.com/googledatalab/datalab/issues/1376

I believe that we will need to install conda and use it for python, pip and all other python packages, and in the interim it may be impossible to mix the two python environments. However, someone who has more experience working with a condo may know differently.

+1
source

Starting from the 2018-02-21 release , Datalab supports Conda and kernels each in its Conda environment.

+1
source

Source: https://habr.com/ru/post/1233879/


All Articles