Liste des Groupes | Revenir à cl python |
Every so often I need to regenerate it (like when Debian updates the system Python version) but that's easy to do: I don't try to duplicate what's installed there, I just delete the old venv, create a new one and then pip install packages as needed.If you have a requirements.txt file with all packages you want, I think you can do pip -install --upgrade -r requirements.txt to update them all. That only works if you don't specify exact versions in the requirements.txt file, so don't use the output of pip freeze to generate that requirements file. Just create it yourself: it's a simple text file with one package per line. Also I prefer not to include dependencies in it for use cases like this (it's another story for packaging, where it can be useful or requirements.txt to mirror your exact environment with dependencies and specific versions).
>
I know this isn't the usual pythonista model of "you should have a zillion different venvs, one for each program you use, and never use system Python packages", but it works well for me: my pip installed packages are all in a predictable place, and I get security updates for all the software Debian *does* package. That's my biggest beef with pip, the lack of an easy way to update everything at once, and it's the reason I prefer Debian packages when available.
Les messages affichés proviennent d'usenet.