I'm trying to run a jupyter notebook from within a venv environment configured using PyCharm. However, when I try to run the code from the jupyter notebook I'm getting the following error when trying to import a module I know to exist
import multipledispatch
ModuleNotFoundError: No module named 'multipledispatch'
If I open a terminal, activate the virtual environment and run the code manually in Python it works without any problems.
When I check the list of installed packages from within the notebook using
python -m pip list
the module appears as expected. If I try to install the module from within the notebook using
!python -m pip install multipledispatch
it tells me that requirements are already satisfied, however, I'm still unable to import the module.
I'm able to import other non-standard modules which I installed after creating the virtualenv, so this appears to be limited to the multipledispatch module. Does anyone have any ideas what might be causing this or how it might be fixed?