[Tutor] Consequences of removing python3-venv

Mats Wichmann mats at wichmann.us
Thu May 9 13:23:14 EDT 2019


On 5/9/19 9:52 AM, Jim wrote:
> My Linux mint18 system recently wanted to up date python 3.6. When I
> clicked install I got the following message:
> 
> The following 2 packages will be removed:
> python3-dev
> python3-venv
> 
> I have 2 virtual environments installed: python 3.5.2 & 3.6.7.
> 
> Listing the various pythons I have installed shows:
> 
> jfb at jims-mint18 ~ $ ls -ls /usr/bin/python*
>    0 lrwxrwxrwx 1 root root       9 Nov 23  2017 /usr/bin/python ->
> python2.7
>    0 lrwxrwxrwx 1 root root       9 Nov 23  2017 /usr/bin/python2 ->
> python2.7
> 3412 -rwxr-xr-x 1 root root 3492656 Nov 12 13:46 /usr/bin/python2.7
>    0 lrwxrwxrwx 1 root root       9 Jan  9  2017 /usr/bin/python3 ->
> python3.5
> 4360 -rwxr-xr-x 2 root root 4464368 Nov 12 10:27 /usr/bin/python3.5
>    0 lrwxrwxrwx 1 root root      33 Nov 12 10:27
> /usr/bin/python3.5-config -> x86_64-linux-gnu-python3.5-config
> 4360 -rwxr-xr-x 2 root root 4464368 Nov 12 10:27 /usr/bin/python3.5m
>    0 lrwxrwxrwx 1 root root      34 Nov 12 10:27
> /usr/bin/python3.5m-config -> x86_64-linux-gnu-python3.5m-config
> 4500 -rwxr-xr-x 2 root root 4604416 Oct 25  2018 /usr/bin/python3.6
>    0 lrwxrwxrwx 1 root root      33 Oct 25  2018
> /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config
> 4500 -rwxr-xr-x 2 root root 4604416 Oct 25  2018 /usr/bin/python3.6m
>    0 lrwxrwxrwx 1 root root      34 Oct 25  2018
> /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config
>    0 lrwxrwxrwx 1 root root      16 Mar 23  2016 /usr/bin/python3-config
> -> python3.5-config
>    0 lrwxrwxrwx 1 root root      10 Jan  9  2017 /usr/bin/python3m ->
> python3.5m
>    0 lrwxrwxrwx 1 root root      17 Mar 23  2016
> /usr/bin/python3m-config -> python3.5m-config
> 
> So will allowing the update harm my virtual environments?
> 
> I really don't want to reinstall them.

venv shouldn't need to be a separate package, since it's considered
"part of Python3", but I don't know what they're thinking exactly over
on the debian side. Maybe it's only for the command, and the module is
part of the regular distribution?  My pyvenv script says not to use it:

WARNING: the pyenv script is deprecated in favour of `python3.7 -m venv`

In any case, I believe python3-venv is a suitable virtual package, such
that it makes sure the one for the right Python exists - as long as it's
not trying to remove python3-venv you should be okay. Or, maybe Mint
have decided to actually remove the command and you'll have to fall back
to calling it as a module as noted above.

Removing the command won't remove your virtualenvs.  But, the Python
upgrade may cause some of your virtual environments might break, and
you'll have to refresh them - if they point to, rather than duplicate,
system stuff which is changing version.  There's a --upgrade option.  So
tread somewhat carefully.




More information about the Tutor mailing list