1 year ago

#376602

test-img

Patrick Tannoury

Python cant find modules

I'm trying to run scripts for webscraping on my server (host/shared hosting) and they use something called virtualenv (I've done some research and its confusing...). However, I did install the required packages for running Selenium and some other processes. I have checked that they are installed by running the command:

$ pip show selenium

Which returns Location: /home/s49674/virtualenv/python/3.9/lib/python3.9/site-packages

However, when I run my python code, it gives me the error that the module is not installed.

What I have to do is to activate the virtualenv through ssh, and call the python script through the ssh. But this doesn't allow me to automate script execution through cronjob. Do you know a solution to this? So far I haven't found anything that works. It doesnt matter where I store the python script, it cant find the modules.

python

linux

selenium

virtualenv

shared-hosting

0 Answers

Your Answer

Accepted video resources