1

I'm working in a python3 virtual env. I run jupyter (not installed in the venv). and in a jupyter notebook, I check the packages installed in the venv.

!pip list

Package Version

cycler 0.10.0

kiwisolver 1.3.1
matplotlib 3.3.4
numpy 1.20.0

pandas 1.2.1
Pillow 8.1.0
pip 20.0.2

pkg-resources 0.0.0
pyparsing 2.4.7
python-dateutil 2.8.1
pytz 2020.5

scipy 1.6.0
seaborn 0.11.1

setuptools 44.0.0

six 1.15.0

but

import pandas , numpy fails with

ModuleNotFoundError: No module named 'pandas'

Why ?

arj
  • 713
  • 2
  • 12
  • 26
  • Did you try installing pandas and numpy in the environment where jupyter is installed? – Ishwar Venugopal Jan 31 '21 at 10:58
  • i think it will solve the problem, but i prefer to keep them separated. I'm running everything in a ubuntu 20.04 WSL in widows10 20H2 build 19042. I'm thinking that WSL have some problems, – arj Jan 31 '21 at 11:05
  • You need to "register" your python env so jupyter can load it as a kernel. Try this answer: https://stackoverflow.com/questions/46270435/changing-python-executable – alexis Feb 03 '21 at 14:03
  • Thanks it worked. Better explanation here https://janakiev.com/blog/jupyter-virtual-envs/ – arj Feb 14 '21 at 14:14

0 Answers0