Your message dated Fri, 24 Feb 2023 12:04:31 +0000
with message-id <[email protected]>
and subject line Bug#1026268: fixed in python3.10 3.10.10-2
has caused the Debian Bug report #1026268,
regarding python3.10: `$ python3 -m venv dir` outputs "Error: name 'cmd' is not
defined" if python3-venv is not installed.
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1026268: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026268
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3.10
Version: 3.10.9-1
Severity: normal
X-Debbugs-Cc: [email protected]
Dear Maintainer,
When I tried to create a python3 venv environment, I got an error message
"Error: name 'cmd' is not defined" and got partially-created venv environment.
Steps I did:
- Ran ` $ python3 -m venv venv ` to create a venv directory under the
current directory, without installing python3-venv.
Expected:
- Have an error message "The virtual environment was not created successfully
because ensurepip is not available."
Actual:
- Got an error message "Error: name 'cmd' is not defined" instead.
I found the following code snippet in /usr/lib/python3.10/venv/__init__.py
is suspicious. It uses a variable 'cmd' without defining it.
> def _setup_pip(self, context):
> """Installs or upgrades pip in a virtual environment"""
> try:
> self._call_new_python(context, '-m', 'ensurepip', '--upgrade',
> '--default-pip', stderr=subprocess.STDOUT)
> except subprocess.CalledProcessError:
> stdlib = sysconfig.get_path('stdlib')
> if not os.path.exists(f'{stdlib}/ensurepip/__main__.py'):
> print("""\
> The virtual environment was not created successfully because ensurepip is not
> available. On Debian/Ubuntu systems, you need to install the python3-venv
> package using the following command.
>
> apt install python{}-venv
>
> You may need to use sudo with that command. After installing the python3-venv
> package, recreate your virtual environment.
>
> Failing command: {}
> """.format(sysconfig.get_python_version(), cmd))
> sys.exit(1)
I installed python3-venv and now venv works for me.
But I'd be glad if I could get the correct error message.
Thanks,
-- System Information:
Debian Release: bookworm/sid
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.0.0-5-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3.10 depends on:
ii libpython3.10-stdlib 3.10.9-1
ii media-types 8.0.0
ii mime-support 3.66
ii python3.10-minimal 3.10.9-1
python3.10 recommends no packages.
Versions of packages python3.10 suggests:
ii binutils 2.39.50.20221208-5
pn python3.10-doc <none>
ii python3.10-venv 3.10.9-1
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: python3.10
Source-Version: 3.10.10-2
Done: Matthias Klose <[email protected]>
We believe that the bug you reported is fixed in the latest version of
python3.10, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <[email protected]> (supplier of updated python3.10 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 24 Feb 2023 12:37:34 +0100
Source: python3.10
Architecture: source
Version: 3.10.10-2
Distribution: unstable
Urgency: medium
Maintainer: Matthias Klose <[email protected]>
Changed-By: Matthias Klose <[email protected]>
Closes: 1026268
Changes:
python3.10 (3.10.10-2) unstable; urgency=medium
.
* Fix removing Debian build flags from _sysconfigdata.
* Fix error message for 'python3 -m venv dir`, when python3-venv
is not installed. Closes: #1026268.
Checksums-Sha1:
5d209c851bfd61ce24c10a789f106b86c2c161cd 3669 python3.10_3.10.10-2.dsc
e919f28fcba7d4f3a70c47193d832dde8bc91ca6 218400
python3.10_3.10.10-2.debian.tar.xz
01062d84074c5c1a7ced90e45e9e0c512d1483f4 10095
python3.10_3.10.10-2_source.buildinfo
Checksums-Sha256:
3a824305a7eab97096979d789b3d72ed07d933c3945155236adc5821cb5871cf 3669
python3.10_3.10.10-2.dsc
a76e9095866babd48b10d3f4b61ed2533286d87ae2593702c49b9431bb6f2845 218400
python3.10_3.10.10-2.debian.tar.xz
15da9a8fdde6697c96dfb6b37c2636b24c72c09e9cff7beb7cdf4d3bb0cb9e19 10095
python3.10_3.10.10-2_source.buildinfo
Files:
f720ad05eacaf191699e3a6016a6f109 3669 python optional python3.10_3.10.10-2.dsc
d4fb8337f7931de67a01de00c40c9e8a 218400 python optional
python3.10_3.10.10-2.debian.tar.xz
0e8b17fb85d65c7304c520ab3ca359cf 10095 python optional
python3.10_3.10.10-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJEBAEBCgAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAmP4o1MQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9WCkD/95KVcLg+jMj19d/exg34tRNBpeCII3op70
fMNpa9YAvvFVeWHLfMcq356SKgXK+LatVSPLhukHjM4sueq08OrU5jSAXlPk6AcQ
nIhAQaAplMlKDgWvbWe543b/PYRe00Pw0GuDMk2KbHSgHNvH2QxQ3BsJTj9DnFeT
3ciPyq+SIAGCXVOq3/yRIkskwyhkpfd4mAkRRAotIoyeF8do6IqPuLPrJnkAzesO
0GtgKWsugfUSCoNW6PdNX1kiYBer0rqSUJ+NQWg8e/JwgoJf/uax8AH55rcVKLDK
eXjersxJIqHTiGx2pOwdV26hntMGVmjOSbYwruqC6OEPRyDPLtUd5MojOxruSJpB
xhGryaSrelOIMRR5xx9wPTbLNmyBK6CQ/Pz2EJVWvKIBEFOzvxydOgCwwpOWZ8M7
OA/TpiWrJ6pOYZF148kR50EAJHq7gYzQ6QxAeGGb+nxgJhxVQb99i8Uv6MlMLAZv
zFmVLO7pm9Q53OoZMxjBKJLhCdz52qLWGfFZadJDoFKI+GKJWIzlhlorTNS9S8QU
g/BiAx8c3/GKzaRmoG51v9sROf7Lp8vfKzg9Wqg+b76FQoq1bTnACODK2bWhb4Vk
n7/GESpVwJmiMr6xru7ggStShMexLEiVuttOxYj5o0ozfOFRVWXpvdjjDHRgJl4o
nfqmY9dhgw==
=X2DB
-----END PGP SIGNATURE-----
--- End Message ---