New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import numpy package after Ubuntu upgrade #16267
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
@UriBarkan Thanks for opening this issue! I saw that you were unable to reproduce this using Python on the command line. If you run |
Hi @JasonWeill, Thanks for your reply! I can import numpy also in ipython (e.g. in Spyder IDE w/ ipython console). Up to now I've encountered this problem only in Jupyterlab. |
If you run |
From within jupyterlab:
Then if I try to run again:
But I get the same error when trying to import numpy. |
Thanks for your reply! After installing the module, can you try restarting the kernel? After that kernel is restarted, does the |
Unfortunately no, nympy cannot be imported also after kernel restart. |
I was able to overcome the issue by redefining the virtual environment. I guess in the upgrade process of Ubuntu something broke. A fix for future users:
I took the liberty of closing this issue. |
Hi,
Description:
Last week I upgraded to Ubuntu 24.04. After the upgrade, when trying to import numpy (for example) in JupyterLab, I get the following message:
ModuleNotFoundError: No module named 'numpy'
When I run Python from terminal or when I try importing the same package on Jupyter notebook, even on the same browser, import is successful. Also, if I open terminal within jupyter-lab (from the launcher) import is also successful. So import fails only when importing from notebooks (tried from different ones).
Disabled all plugins. Also, tried to reinstall jupyter-lab (“pipx reinstall jupyterlab”), to no avail.
Reproduce:
Expected behavior:
numpy to load successfully.
Context:
OS: Linux Ubuntu 24.04.
Brwoser: Chromium Version 124.0.6367.60 (Official Build) snap (64-bit)
Also tested on Firefox 125.0.3 (64-bit) and got the same error
Jupyterlab 4.1.8
Jupyter-notebook 6.4.12 (the error is not reproducible in Jupyter-notebook, only in Jupyterlab)
Python 3.12.3
Troubleshoot output:
bash: /x/y/.local/bin/jupyter-troubleshoot: cannot execute: required file not found
For 'jupyter-lab --debug' please see attached text file:
jupyter lab debug.txt
For browser output see the screenshot:
Thanks!
The text was updated successfully, but these errors were encountered: