holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.69k stars 402 forks source link

Problem importing holoviews module #5696

Open FredDuj opened 1 year ago

FredDuj commented 1 year ago

Thanks for contacting us! Please read and follow these instructions carefully, then delete this introductory text to keep your issue easy to read. Note that the issue tracker is NOT the place for usage questions and technical assistance; post those at Discourse instead. Issues without the required information below may be closed immediately.

ALL software version info

Package Version


bokeh 2.4.3 holoviews 1.15.4 hvplot 0.8.3 ipykernel 6.16.2 ipython 7.34.0 ipywidgets 8.0.3 json5 0.9.10 jupyter-client 7.1.2 jupyter_core 4.12.0 jupyter-server 1.23.3 jupyterlab 3.5.1 jupyterlab_server 2.16.5 jupyterlab-widgets 3.0.4 matplotlib 3.5.3 numpy 1.21.6 pandas 1.3.5 scipy 1.7.3 seaborn 0.12.2

Description of expected behavior and the observed behavior

I am new to holoviews and trying to import the module in a jupyter lab notebook. I get the list of modules above directly inside the jupyter lab notebook using "!pip list " in the previous cell. Then I try to "import holoviews as hv" (after importing pandas and numpy) but I get the error message :


ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_18320\2580690226.py in 1 import pandas as pd 2 import numpy as np ----> 3 import holoviews as hv 4 from holoviews import opts

ModuleNotFoundError: No module named 'holoviews'

hoxbro commented 1 year ago

My guess would be that you are in the wrong environment. Are you using conda or venv?

FredDuj commented 1 year ago

My guess would be that you are in the wrong environment. Are you using conda or venv?

Yes, i am using conda environments. I checked that I launched jupyter lab in the correct environment. Moreover, i used !pip list directly in jupyter lab to double check if the holoviews was there as well (my understanding is that !pip list would show me only the currently available modules)

hoxbro commented 1 year ago

Try writing !conda info and !conda list in the notebook and paste them here.

FredDuj commented 1 year ago

Try writing !conda info and !conda list in the notebook and paste them here.

My company has a strict firewall and we are using an internal repository copy for modules. I am using pip only for the modules, not conda. Here are the outputs :

!conda info:

     active environment : py37_test
    active env location : C:\Users\fdujardin\.conda\envs\py37_test
            shell level : 2
       user config file : C:\Users\fdujardin\.condarc
 populated config files : C:\Users\fdujardin\.condarc
          conda version : 4.8.2
    conda-build version : 3.18.11
         python version : 3.7.6.final.0
       virtual packages : 
       base environment : C:\ProgramData\Anaconda3  (read only)
           channel URLs : https://****factory.mycloud.intranatixis.com/artifactory/conda/win-64
                          https://****factory.mycloud.intranatixis.com/artifactory/conda/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\fdujardin\.conda\pkgs
                          C:\Users\fdujardin\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\fdujardin\.conda\envs
                          C:\ProgramData\Anaconda3\envs
                          C:\Users\fdujardin\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

!conda list:

a bit long so I show up to holoviews:

# packages in environment at C:\Users\fdujardin\.conda\envs\py37_test:
#
# Name                    Version                   Build  Channel
anyio                     3.6.2                    pypi_0    pypi
attrs                     22.1.0                   pypi_0    pypi
babel                     2.11.0                   pypi_0    pypi
backcall                  0.2.0                    pypi_0    pypi
beautifulsoup4            4.11.1                   pypi_0    pypi
bleach                    5.0.1                    pypi_0    pypi
blpapi                    3.14.0                   pypi_0    pypi
bokeh                     2.4.3                    pypi_0    pypi
ca-certificates           2022.9.24            h5b45459_0    https://****factory.mycloud.intranatixis.com/artifactory/conda
certifi                   2022.12.7                pypi_0    pypi
cffi                      1.15.1                   pypi_0    pypi
charset-normalizer        2.1.1                    pypi_0    pypi
colorama                  0.4.6                    pypi_0    pypi
colorcet                  3.0.1                    pypi_0    pypi
cycler                    0.11.0                   pypi_0    pypi
datetime                  5.0                      pypi_0    pypi
debugpy                   1.6.4                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
entrypoints               0.4                      pypi_0    pypi
et-xmlfile                1.1.0                    pypi_0    pypi
fastjsonschema            2.16.2                   pypi_0    pypi
fonttools                 4.38.0                   pypi_0    pypi
greenlet                  2.0.1                    pypi_0    pypi
holoviews                 1.15.4                   pypi_0    pypi
hvplot                    0.8.3                    pypi_0    pypi
hoxbro commented 1 year ago

At a glance, I don't see any problems. My suggestions would be: