Need to reinstall Django modules after every venv restart

Hi I am facing an issue I do not understand.

I created a Django webapp project which I have residing on a GitHub repository.

I have recently had the need to revisit this project to add new features. So I cloned the project to a local PC (A MAC running python and my VS Code environment).

I created a Python venv machine to contain everything I need within for this project. This works great and I can code the new features and run the App in my local browser.

The issue I am having is every time I shut my PC off at night then restart in the morning, after activating the venv a number (not all) of the installed modules need to be reinstalled before my project will let me run the server.

While I can get around this by spending the 10 minutes or so everyday reinstalling modules. Its frustrating and I do not understand why this is occurring?

All advice greatly appreciated.

Kind regards

Duncan

Try to share the error message in your shell when your start again your PC in the morning

Hi I am now struggling to replicate the issue. I think I may have closed my venv session without first deactivating it (by simply closing VSCode - which I assume crashed out of the venv session rather ungracefully). I deactivated my latest session and then reactivated it and did not get the same errors when I ran the virtual Django server. I had installed the modules Django was complaining about during the session I simply closed so the have to assume deactivation saves some configuration as it leaves the venv. Anyway if the issue pops back up after a PC shutdown I’ll post the error here. Thanks D

1 Like