Setting up working environment for tutorial

Hi folks,

I’m pretty new to python. I came across holoviz and it seemed like a handy tool to learn about. However I’m struggling to get the initial environment setup to be able to run the tutorial. I’m using the latest 64-bit windows install of ananconda3 (currently 2020.11).

I followed the setup instructions for holoviz verbatim, but when I am testing the setup in 00_Setup.ipynb, the last cell results in the “SNAPPY is missing, so data cannot be read.” message. If I try to continue on anyways to 02_Building_Panels, the first cell fails on the call to dask.dataframe.read_parquet with: “RuntimeError: Please install either fastparquet or pyarrow”.

I then tried just running “import fastparquet as fp” to see if that would work. This gave me the following error: “ImportError: cannot import name ‘BaseMaskedDtype’ from ‘pandas.core.arrays.masked’ (C:\Users\me\anaconda3\envs\holoviz-tutorial\lib\site-packages\pandas\core\arrays\”

It seems like there is some kind of package version incompatibility occurring… I found this thread that sounds similar to the problem I am having, but I’m not trying to use conda-forge, and I don’t quite understand the whole env.yml thing. Can anyone suggest an easy way to get past this?

After struggling with it for a while longer, it looks like I managed to get it running. I started with a fresh miniconda install, updated conda, created a python 3.7 environment, then tried installing holoviz from conda-forge. This didn’t work, I ended up in the same place I mentioned in the OP.

I then made a new environment and installed holoviz from the pyviz channel like the instructions say to do. This seems to have worked. I’m not sure why it works using miniconda and not anaconda, but whatever. Hopefully this helps anyone else who runs into problems when trying to do the tutorial.

1 Like

Hi @Zalfrin.

Welcome to the community. Happy you got it solved. Thanks for sharing the solution.

I just successfully used conda-forge packages to create an environment to run the Holoviz Tutorial, so wanted to report that success back here! :slight_smile:

I used Mamba to create the environment instead of conda since it’s faster, but that’s not necessary, of course. Here’s my recipe:

conda config --add channels conda-forge --force
source activate base
conda install mamba -y
mamba env create -f pangeo_env.yml

using this pangeo_env.yml.
This environment contains everything I need for running the HoloViz tutorial, plus a few other packages I know I’ll want to use with HoloViz and my modeling work.

Because I want to tunnel in with ssh, I set a password:

mamba activate pangeo
jupyter server --generate-config
jupyter server password

and then I run this command:

source activate pangeo
echo "ssh -N -L 8888:`hostname`:8888  `whoami`"
cd $HOME/EarthMap/Projects
jupyter lab --no-browser --ip=`hostname` --port=8888

which activates the environment, prints out the command I need to execute to ssh in, and then starts up jupyterlab on port 8888. After ssh’ing in with that command, I then point my browser at localhost:8888, my dask dashboard at localhost:8888/proxy/8787, and I’m good to go!

1 Like