0

The import is import pandas_market_calendars.

First let's see that it's available in the virtualenv:

me@me-ThinkPad-T470p:~/myprojct/bin$ source activate (myprojct) me@me-ThinkPad-T470p:~/myprojct/bin$ ipython Python 3.5.2 (default, Nov 23 2017, 16:37:01) Type 'copyright', 'credits' or 'license' for more information IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: In [1]: import pandas_market_calendars In [2]: quit() 

Good. Now I launch the jupyter notebook:

(myprojct) me@me-ThinkPad-T470p:~/myprojct/docs$ jupyter notebook unit_tests.ipynb 

and in that notebook, I have a line:

import pandas_market_calendars 

that gives:

--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-2-686a3ec1e720> in <module>() ----> 1 import pandas_market_calendars ImportError: No module named 'pandas_market_calendars' 
4
  • 1
    You actually need a jupyter notebook installation and kernel that point to your virtualenv python interpreter. The notebook you're opening is probably pointing to a python version outside of your virtual environment. Commented Dec 25, 2017 at 23:54
  • @abdou: thanks that helps a lot (total jupyter newbie here). Do you mean something like this? Commented Dec 25, 2017 at 23:56
  • 1
    That is exactly what I am referring to. Give it a go and see if it'll do. Commented Dec 25, 2017 at 23:59
  • @Abdou: it worked! Thanks again for the pointer! Commented Dec 26, 2017 at 0:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.