2

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:

  1. 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
  2. Launching jupyter:
    • ! which python correctly shows my venv kernel (same for pip).
    • ! pip install uproot runs and shows the package is installed.
  3. 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

Paidoo
  • 379
  • 3
  • 13

1 Answers1

0

Closing this as I discovered something in my terminal environment causing the specified issue. However I have a (probably related) issue which I have created another question for here.

Paidoo
  • 379
  • 3
  • 13