[Fixed]-Production server saying it is missing modules after database flush with Python

1👍

I am curious, when you put your application on a production server, does your virtual environment go with it ?

Not necessarily unless you copied the virtualenv folder with it which isn’t really a good practice, you should create the virtualenv on the production server

If so, does flushing your database have any effect on your virtual environment ?

No, the database and virtualenv are completely separate

I wouldn’t want to continue doing that if there are 100+ modules

Use a requirements.txt file and install them all at one go with pip install -r requirements.txt

I also tried to use pip install on my production server, and it said that the command was not found

You have to install pip first, on the production server

👤bakkal

Leave a comment