Sorry if this is a dupe, the similar questions I found all involved anaconda, which I am not using. I am fairly new to python and the jupyter environment.
When I try to import the 'uproot' package to my jupyter notebook or jupyter lab, I get the error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-dafb83b77728> in <module>
2 import matplotlib.pylab as plt
3 import pandas as pd
----> 4 import uproot
5 import os
ModuleNotFoundError: No module named 'uproot'
I include the full ouput to note that there doesn't seem to be an issue with matplotlib, pandas (or numpy).
Further info:
- I am using a venv
- I invoked this with
python3 -m venv .my-venv
- I activate this, and then run jupyter
- all packages installed at once with
pip install numpy pandas matplotlib uproot
- I invoked this with
- Launching jupyter:
! which python
correctly shows my venv kernel (same for pip).! pip install uproot
runs and shows the package is installed.
- I tested the python3 interpreter in CLI (inside the venv) and when I enter
import uproot
it does not throw any errors.
Uproot is a package that allows me to read the format of data files I'm using directly into a pandas data-frame, so without it I am at a complete dead end.
I'm totally stuck as to why this is not working in jupyter, and would greatly appreciate any input in what could be wrong or how to further troubleshoot.
Cheers, Paul