How do I update a virtualenv?

Skip Montanaro skip at pobox.com
Wed Oct 30 11:18:47 EDT 2013


> I believe you may have misread the instructions slightly. You should have a
> project structure like this:
>
>     my_project/
>         /venv
>         .gitignore
>
> The instructions mention adding 'venv' to your .gitignore, so it will be
> excluded from version control. If you have .git & .gitignore files inside
> your venv folder, then you've changed directory into it when you should be
> calling it from the project root instead.

I have .git and .gitignore at the top level, and venv is in
.gitignore. I did, indeed, misunderstand things though. That's the
problem with monkey-see-monkey-do. I completely glossed over the part
where venv was excluded from my git repo. That being the case then, to
update my virtualenv, I need to first create a new one in a fresh
directory (using my existing requirements.txt file). I should be able
to simply swap out the old venv directory for the new one.

Skip



More information about the Python-list mailing list