ml-struct-bio/cryodrgn

Install fails with jupyter lab build

Closed this issue · 1 comments

clil16 commented

Describe the bug
Following the instructions for installing the dependencies for cryoDRGN jupyter returns an error when running jupyter lab build.

I realize this is most likely an issue with Jupyter but has anyone resolved the issue? This has been seen on Ubuntu 22.04 and RHEL 8.7 with Miniconda 3.

The relevant error from the jupyter debug log is (as near as I can tell):

...snip....
[LabBuildApp] > node /sw/miniconda/3/envs/cryodrgn/lib/python3.9/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
[LabBuildApp] yarn run v1.21.1
$ webpack --config webpack.prod.minimize.config.js
[webpack-cli] /sw/miniconda/3/envs/cryodrgn/share/jupyter/lab/staging/node_modules/webpack/lib/cli.js:67
                                /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/gu,
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/: Invalid property name
...snip...

To Reproduce

(base) $ conda create -y --name cryodrgn python=3.9
(base) $ conda activate cryodrgn
(cryodrgn) $ conda install -y pytorch cudatoolkit -c pytorch
(cryodrgn) $ conda install -y pandas
(cryodrgn) $ conda install -y seaborn scikit-learn
(cryodrgn) $ conda install -y umap-learn jupyterlab ipywidgets cufflinks-py "nodejs>=15.12.0" -c conda-forge
(cryodrgn) $ jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
(cryodrgn) $ jupyter labextension install jupyterlab-plotly --no-build
(cryodrgn) $ jupyter labextension install plotlywidget --no-build
(cryodrgn) $ jupyter lab build

Expected behavior
The command jupyter lab build should exit successfully.

Additional context

  • Conda environment packages and their versions:
(cryodrgn) $ conda list
# packages in environment at /sw/miniconda/3/envs/cryodrgn:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
anyio                     3.6.2              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyhd3eb1b0_0  
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39hb9d737c_2    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
babel                     2.12.1             pyhd8ed1ab_1    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
blas                      1.0                         mkl  
bleach                    6.0.0              pyhd8ed1ab_0    conda-forge
bottleneck                1.3.5            py39h7deecbd_0  
brotli                    1.0.9                h5eee18b_7  
brotli-bin                1.0.9                h5eee18b_7  
brotlipy                  0.7.0           py39h27cfd23_1003  
ca-certificates           2023.5.7             hbcca054_0    conda-forge
certifi                   2023.5.7           pyhd8ed1ab_0    conda-forge
cffi                      1.15.1           py39h5eee18b_3  
charset-normalizer        2.0.4              pyhd3eb1b0_0  
chart-studio              1.1.0              pyh9f0ad1d_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
colorlover                0.3.0                      py_0    conda-forge
contourpy                 1.0.5            py39hdb19cb5_0  
cryptography              39.0.1           py39h9ce1e76_0  
cudatoolkit               11.3.1               h2bc3f7f_2  
cufflinks-py              0.17.3                     py_0    conda-forge
cycler                    0.11.0             pyhd3eb1b0_0  
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
filelock                  3.9.0            py39h06a4308_0  
flit-core                 3.8.0              pyhd8ed1ab_0    conda-forge
fonttools                 4.25.0             pyhd3eb1b0_0  
freetype                  2.12.1               h4a9f257_0  
giflib                    5.2.1                h5eee18b_3  
gmp                       6.2.1                h295c915_3  
gmpy2                     2.1.2            py39heeb90bb_0  
icu                       58.2              hf484d3e_1000    conda-forge
idna                      3.4              py39h06a4308_0  
importlib-metadata        6.6.0              pyha770c72_0    conda-forge
importlib_resources       5.2.0              pyhd3eb1b0_1  
intel-openmp              2023.1.0         hdb19cb5_46305  
ipykernel                 5.5.5            py39hef51801_0    conda-forge
ipython                   8.13.2             pyh41d4057_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.0.6              pyhd8ed1ab_0    conda-forge
jedi                      0.18.2             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2            py39h06a4308_0  
joblib                    1.1.1            py39h06a4308_0  
jpeg                      9e                   h5eee18b_1  
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.17.3             pyhd8ed1ab_0    conda-forge
jupyter_client            7.0.6              pyhd8ed1ab_0    conda-forge
jupyter_core              4.12.0           py39hf3d152e_0    conda-forge
jupyter_server            1.23.6             pyhd8ed1ab_0    conda-forge
jupyterlab                3.5.3              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.22.1             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.7              pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.4            py39h6a678d5_0  
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.38                 h1181459_1  
lerc                      3.0                  h295c915_0  
libbrotlicommon           1.0.9                h5eee18b_7  
libbrotlidec              1.0.9                h5eee18b_7  
libbrotlienc              1.0.9                h5eee18b_7  
libdeflate                1.17                 h5eee18b_0  
libffi                    3.4.2                h6a678d5_6  
libgcc-ng                 11.2.0               h1234567_1  
libgfortran-ng            11.2.0               h00389a5_1  
libgfortran5              11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libllvm11                 11.1.0               hf817b99_2    conda-forge
libpng                    1.6.39               h5eee18b_0  
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libstdcxx-ng              11.2.0               h1234567_1  
libtiff                   4.5.0                h6a678d5_2  
libuv                     1.44.2               h5eee18b_0  
libwebp                   1.2.4                h11a3e52_1  
libwebp-base              1.2.4                h5eee18b_1  
llvmlite                  0.39.1           py39he621ea3_0  
lz4-c                     1.9.4                h6a678d5_0  
markupsafe                2.1.1            py39h7f8727e_0  
matplotlib-base           3.7.1            py39h417a72b_1  
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mistune                   2.0.5              pyhd8ed1ab_0    conda-forge
mkl                       2023.1.0         h6d00ec8_46342  
mkl-service               2.4.0            py39h5eee18b_1  
mkl_fft                   1.3.6            py39h417a72b_1  
mkl_random                1.2.2            py39h417a72b_1  
mpc                       1.1.0                h10f8cd9_1  
mpfr                      4.0.2                hb69a4c5_1  
mpmath                    1.2.1            py39h06a4308_0  
munkres                   1.1.4                      py_0  
nbclassic                 1.0.0              pyh8b2e9e2_0    conda-forge
nbclient                  0.7.4              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.3.1              pyhd8ed1ab_0    conda-forge
nbformat                  5.8.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.4                  h6a678d5_0  
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
networkx                  2.8.4            py39h06a4308_1  
nodejs                    18.15.0              ha637b67_0  
notebook                  6.5.4              pyha770c72_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
numba                     0.56.4           py39h417a72b_0  
numexpr                   2.8.4            py39hc78ab66_1  
numpy                     1.23.5           py39hf6e8229_1  
numpy-base                1.23.5           py39h060ed82_1  
openssl                   1.1.1t               h7f8727e_0  
packaging                 23.0             py39h06a4308_0  
pandas                    1.5.3            py39h417a72b_0  
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.4.0            py39h6a678d5_0  
pip                       23.0.1           py39h06a4308_0  
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
plotly                    5.14.1             pyhd8ed1ab_0    conda-forge
pooch                     1.4.0              pyhd3eb1b0_0  
prometheus_client         0.16.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.38             pyha770c72_0    conda-forge
prompt_toolkit            3.0.38               hd8ed1ab_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd3eb1b0_0  
pygments                  2.15.1             pyhd8ed1ab_0    conda-forge
pynndescent               0.5.10             pyh1a96a4e_0    conda-forge
pyopenssl                 23.0.0           py39h06a4308_0  
pyparsing                 3.0.9            py39h06a4308_0  
pyrsistent                0.18.0           py39heee7806_0  
pysocks                   1.7.1            py39h06a4308_0  
python                    3.9.16               h7a1cb2a_2  
python-cufflinks          0.17.3                     py_0    conda-forge
python-dateutil           2.8.2              pyhd3eb1b0_0  
python-fastjsonschema     2.16.3             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytorch                   2.0.1               py3.9_cpu_0    pytorch
pytorch-mutex             1.0                         cpu    pytorch
pytz                      2022.7           py39h06a4308_0  
pyzmq                     19.0.2           py39hb69f2a1_2    conda-forge
readline                  8.2                  h5eee18b_0  
requests                  2.29.0           py39h06a4308_0  
retrying                  1.3.3                      py_2    conda-forge
scikit-learn              1.2.2            py39h6a678d5_0  
scipy                     1.10.1           py39hf6e8229_1  
seaborn                   0.12.2           py39h06a4308_0  
send2trash                1.8.2              pyh41d4057_0    conda-forge
setuptools                66.0.0           py39h06a4308_0  
six                       1.16.0             pyhd3eb1b0_1  
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
sqlite                    3.41.2               h5eee18b_0  
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
sympy                     1.11.1           py39h06a4308_0  
tbb                       2021.8.0             hdb19cb5_0  
tenacity                  8.2.2              pyhd8ed1ab_0    conda-forge
terminado                 0.17.1             pyh41d4057_0    conda-forge
threadpoolctl             2.2.0              pyh0d69192_0  
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h1ccaba5_0  
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39hb9d737c_3    conda-forge
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
traitlets                 5.9.0              pyhd8ed1ab_0    conda-forge
typing_extensions         4.5.0            py39h06a4308_0  
tzdata                    2023c                h04d1e81_0  
umap-learn                0.5.3            py39hf3d152e_0    conda-forge
urllib3                   1.26.15          py39h06a4308_0  
wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.5.1              pyhd8ed1ab_0    conda-forge
wheel                     0.38.4           py39h06a4308_0  
widgetsnbextension        4.0.7              pyhd8ed1ab_0    conda-forge
xz                        5.4.2                h5eee18b_0  
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.11.0           py39h06a4308_0  
zlib                      1.2.13               h5eee18b_0  
zstd                      1.5.5                hc292b87_0  
  • Jupyter lab extensions:
(cryodrgn) $ jupyter labextension list
JupyterLab v3.5.3
/sw/miniconda/3/envs/cryodrgn/share/jupyter/labextensions
        jupyterlab-plotly v5.14.1 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        @jupyter-widgets/jupyterlab-manager v5.0.7 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /sw/miniconda/3/envs/cryodrgn/share/jupyter/lab
        plotlywidget v4.14.3 enabled OK


Build recommended, please run `jupyter lab build`:
    plotlywidget needs to be included in build
  • The jupyter debug log file is attached to this issue

jupyterlab-debug-04vw9qxk.log

As of #331 we recommend avoiding using the plotly widgets if you are having trouble with the jupyterlab installation and using the cryodrgn filter interactive interface instead. The manner in which the jupyterlab extension dependencies are specified is inherently unstable as it is outside of the package indices used by conda, and although this may change at some point, for now we are trying an implementation that only depends on matplotlib.

Example usage:

cryodrgn analyze 01_cryodrgn256 24
cryodrgn filter 01_cryodrgn256