.. title: Upgrading virtualenvs in fish
.. slug: upgrading-virtualenvs-in-fish
.. date: 2021-12-29 15:55:32 UTC
.. tags: linux, presentations, web
.. category: 
.. link: 
.. description: 
.. type: text

Python major version upgrades such as the one from 3.9 to 3.10 a few weeks ago require rebuilding any virtual environments created earlier. The `generic one-liner I gave in an earlier post <https://cobra.pdes-net.org/posts/a-one-liner-to-upgrade-your-virtualenvs.html#>`_ works in all shells, but as an avid user of the `fish shell <https://cobra.pdes-net.org/posts/seafood.html>`_, I'm of course employing `virtualfish <https://virtualfish.readthedocs.io/en/latest/index.html>`_ for managing my virtual environments. And `upgrading <https://virtualfish.readthedocs.io/en/latest/usage.html#upgrading-virtual-environments>`_ them in fish is even easier than with the one-liner above:

::

	vf upgrade --rebuild   

Prior to that, one also needs to rebuild the virtualfish for the python version upgrade:

::

	yay --rebuild -S virtualfish

Afterwards, one can see to the update of the content of the virtualenv as documented in my `earlier post <https://cobra.pdes-net.org/posts/a-one-liner-to-upgrade-your-virtualenvs.html#>`_. Compared to the entire recreation of the virtualenv, this whole procedure is as painless as fast – which makes the whole concept of virtualenvs an eminently practical one.
