|
|
|
|
|
by Doxin
1197 days ago
|
|
When creating the venv it hardcodes some paths so the python interpreter knows where to find its modules and the likes. That said, re-creating a venv shouldn't be hard and if it is you're doing something wrong in your development setup. |
|
1. Copy my code out from the venv folder
2. Delete the venv folder
3. Make a new venv
4. Copy my code back into the new venv folder
5. Re-install dependencies
This doesn't take much longer than 60 seconds, but that's 55 seconds more than I want to spend. How is this a good process? It just makes me avoid using python (at least when I'd need anything outside the standard library).
Is there a simple command that will do this all for me?
Note that I don't typically have a git repository or similar set up because I use python for very simple semi-throw-away scripts. I just want to be able to rename the containing folder and have my script still work.