I am working under Windows 10, and I have several version of python, but I need to work under Python 3.8.10 (with pyenv shell 3.8.10 check the picture below).
I get this exception when I launch my code:
Exception has occurred: ModuleNotFoundError No module named 'statsmodels'
However, statsmodels has already been installed with pip (under the 3.10.8 MS version). Indeed, it works under 3.10.8 but not under 3.8.10.
So I have activated venv i.e. with this command ..venv\Scripts\activate, and I install again inside this virtual environnement.
Indeed, now I see statsmodels under c:\my_project_folder.venv\include\lib\site-packages
I have set $PYHTONPATH="path to the project folder" through system properties/advanced/emvironement variables
Someone has an idea how to fix this exception ?