I created a app based on Vuejs (frontend) and Node.js/Express (backend), both have domains and they are online on web.
Inside the backend, I have some files scripts written in Python which I also had to install some external libraries (pandas, numpy, selenium...).
IN LOCALHOST:
All works fine, I installed all external libraries in venv (virtual env) and i have to execute the following commands to work with:
source venv/bin/activate - to activate the venv
npm run start - to create a server in my localhost.
All python scripts are working well!
IN PRODUCTION (VPS):
My problem is here! All scripts which has a external lib does not work! I got the following error.
{ "traceback": "Traceback (most recent call last):\n File
"scripts/script-03.py", line 10, in \n from selenium import
webdriver\nModuleNotFoundError: No module named 'selenium'\n",
"executable": "python3", "options": null, "script":
"scripts/script-03.py", "args": [ "{}" ], "exitCode": 1 }
Before to deploy all files on VPS, I installed all libraries in localhost with venv activated! So, all libraries should be there and in localhost is ok there.
But according to the error message, venv is not activating because the message says 'No module named 'selenium'\n, but selenium is installed inside venv.
There is any way to let venv activated on VPS production? I should do something to make a deploy using venv and python?
All my code is public in github. If you want to check it.
https://github.com/jdenari/metaseed/tree/master/backend
Thanks in advance