python-shell
python-shell copied to clipboard
python cannot find installed module
i have installed numpy using pip. running python locally i can import it without problems, but when pyshell runs, then the python script cannot find the numpy module. the user running the nodejs process is the same as the user which has installed the packages.
packages are located under:
python -m site sys.path = [ ... '/usr/local/lib/python3.11/site-packages', ]
how come ?
it seems that the path "'/usr/local/lib/python3.11/site-packages'," is missing under sys.path .. is there a way to add it from the pysehll options ?
create a virtual env in the same directory to create run the following commands
pip install virtualenv
virtualenv venv
source venv/scripts/activate
pip install numpy
now run the file it should work