Debian Bug report logs -
#815864
python3-venv: unable to create a virtual environment
Reported by: Florent Rougon <f.rougon@free.fr>
Date: Thu, 25 Feb 2016 07:51:02 UTC
Severity: serious
Fixed in version python3.5/3.5.1-8
Done: Matthias Klose <doko@ubuntu.com>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#815864; Package python3-venv.
(Thu, 25 Feb 2016 07:51:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Florent Rougon <f.rougon@free.fr>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@debian.org>.
(Thu, 25 Feb 2016 07:51:07 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: python3-venv
Version: 3.5.1-2
Severity: serious
Justification: renders the package unusable
Hello,
It seems current Python 3 packages in Debian unstable don't allow
creating a virtual environment anymore with pyvenv and friends:
~/python-venv % /usr/bin/python3.5 -m venv testdir
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-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
~/python-venv % dpkg -l python3-venv
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii python3-venv 3.5.1-2 amd64 pyvenv-3 binary for python3 (defa
~/python-venv %
Thanks in advance for looking into this.
Regards
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.4.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages python3-venv depends on:
ii python3 3.5.1-2
ii python3.5-venv 3.5.1-7
python3-venv recommends no packages.
python3-venv suggests no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#815864; Package python3-venv.
(Thu, 25 Feb 2016 12:00:08 GMT) (full text, mbox, link).
Acknowledgement sent
to Florent Rougon <f.rougon@free.fr>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Thu, 25 Feb 2016 12:00:08 GMT) (full text, mbox, link).
Message #10 received at 815864@bugs.debian.org (full text, mbox, reply):
Some more info:
Inserting a 'print(cmd)' at line 259 showed that the direct cause of
the error message is the command:
['/home/flo/python-venv/testdir/bin/python3.5',
'-Im', 'ensurepip', '--upgrade', '--default-pip']
exiting with a non-zero exit status. Running this command by hand after
the venv creation failed yields:
~/python-venv % /home/flo/python-venv/testdir/bin/python3.5 -Im ensurepip --upgrade --default-pip; echo $?
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.5/ensurepip/__main__.py", line 4, in <module>
ensurepip._main()
File "/usr/lib/python3.5/ensurepip/__init__.py", line 218, in _main
version="pip {}".format(version()),
File "/usr/lib/python3.5/ensurepip/__init__.py", line 74, in version
assert len(wheel_names) == 1, wheel_names
AssertionError: []
1
~/python-venv %
The assertion error comes from this in
/usr/lib/python3.5/ensurepip/__init__.py:
wheel_names = glob.glob('/usr/share/python-wheels/pip-*.whl')
assert len(wheel_names) == 1, wheel_names
and indeed:
~/python-venv % ls /usr/share/python-wheels/pip-*.whl
zsh: no matches found: /usr/share/python-wheels/pip-*.whl
~/python-venv % apt-file search /usr/share/python-wheels/pip-
virtualenv: /usr/share/python-wheels/pip-8.0.2-py2.py3-none-any.whl
~/python-venv %
I then installed the 'virtualenv' package, which does provide the
mentioned file, and tried to recreate the venv from scratch after adding
a 'print(os.getcwd())' right after the previously-added 'print(cmd)' in
/usr/lib/python3.5/venv/__init__.py (lines 259-260, before the 'try'
statement in EnvBuilder._setup_pip()):
~/python-venv % rm -rf testdir
~/python-venv % /usr/bin/python3.5 -m venv testdir
['/home/flo/python-venv/testdir/bin/python3.5', '-Im', 'ensurepip', '--upgrade', '--default-pip']
/home/flo/python-venv
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-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
~/python-venv % /usr/bin/python3.5 -c "import subprocess; subprocess.check_output(['/home/flo/python-venv/testdir/bin/python3.5', '-Im', 'ensurepip', '--upgrade', '--default-pip'])"
Traceback (most recent call last):
File "/tmp/tmpicb907db/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/__init__.py", line 33, in vendored
ImportError: No module named 'pip._vendor.cachecontrol'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.5/ensurepip/__main__.py", line 4, in <module>
ensurepip._main()
File "/usr/lib/python3.5/ensurepip/__init__.py", line 269, in _main
default_pip=args.default_pip,
File "/usr/lib/python3.5/ensurepip/__init__.py", line 175, in bootstrap
_run_pip(args + _PROJECTS, additional_paths)
File "/usr/lib/python3.5/ensurepip/__init__.py", line 65, in _run_pip
import pip
File "/tmp/tmpicb907db/pip-8.0.2-py2.py3-none-any.whl/pip/__init__.py", line 12, in <module>
File "/tmp/tmpicb907db/pip-8.0.2-py2.py3-none-any.whl/pip/exceptions.py", line 6, in <module>
File "/tmp/tmpicb907db/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/__init__.py", line 52, in <module>
File "/tmp/tmpicb907db/pip-8.0.2-py2.py3-none-any.whl/pip/_vendor/__init__.py", line 35, in vendored
ImportError: No module named 'cachecontrol'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/flo/python-venv/testdir/bin/python3.5', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1
~/python-venv %
--
Florent
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#815864; Package python3-venv.
(Mon, 29 Feb 2016 18:57:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Florent Rougon <f.rougon@free.fr>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Mon, 29 Feb 2016 18:57:11 GMT) (full text, mbox, link).
Message #15 received at 815864@bugs.debian.org (full text, mbox, reply):
Simple workaround for this bug:
1) Create the venv with --without-pip. For instance:
/usr/bin/python3.5 -m venv --without-pip <venv-dir>
2) Download https://bootstrap.pypa.io/get-pip.py as ~/tmp/get-pip.py.
3) Bootstrap pip "manually" in your venv:
<venv-dir>/bin/python ~/tmp/get-pip.py
HTH
--
Florent
Bug reassigned from package 'python3-venv' to 'python3.5'.
Request was from Barry Warsaw <barry@debian.org>
to control@bugs.debian.org.
(Wed, 02 Mar 2016 14:33:05 GMT) (full text, mbox, link).
No longer marked as found in versions python3-defaults/3.5.1-2.
Request was from Barry Warsaw <barry@debian.org>
to control@bugs.debian.org.
(Wed, 02 Mar 2016 14:33:06 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#815864; Package python3.5.
(Wed, 02 Mar 2016 14:36:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
Your message did not contain a Subject field. They are recommended and
useful because the title of a Bug is determined using this field.
Please remember to include a Subject field in your messages in future.
(Wed, 02 Mar 2016 14:36:05 GMT) (full text, mbox, link).
Message #24 received at 815864@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Attached is the patch that fixes this problem; it has already been forwarded
to Matthias. The potentially controversial bit is the new dependency on
virtualenv, which is required to pick up the pip wheel. Alternatively, we
could split python-virtualenv into a separate -support binary package, but
that of course would have to go through NEW.
[venv.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#815864; Package python3.5.
(Thu, 03 Mar 2016 22:15:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
Your message did not contain a Subject field. They are recommended and
useful because the title of a Bug is determined using this field.
Please remember to include a Subject field in your messages in future.
(Thu, 03 Mar 2016 22:15:11 GMT) (full text, mbox, link).
Message #29 received at 815864@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Ignore the last patch. This one is better because it no longer forces
python3.5-venv to Depends on virtualenv. With 8.0.3-3, python-pip-whl
contains all the necessary wheels.
[venv.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#815864; Package python3.5.
(Wed, 09 Mar 2016 23:15:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Barry Warsaw <barry@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
Your message did not contain a Subject field. They are recommended and
useful because the title of a Bug is determined using this field.
Please remember to include a Subject field in your messages in future.
(Wed, 09 Mar 2016 23:15:03 GMT) (full text, mbox, link).
Message #34 received at 815864@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Patch updated, hopefully for the last time!
[venv.patch (text/x-patch, attachment)]
Reply sent
to Matthias Klose <doko@ubuntu.com>:
You have taken responsibility.
(Fri, 18 Mar 2016 16:45:13 GMT) (full text, mbox, link).
Notification sent
to Florent Rougon <f.rougon@free.fr>:
Bug acknowledged by developer.
(Fri, 18 Mar 2016 16:45:14 GMT) (full text, mbox, link).
Message #39 received at 815864-close@bugs.debian.org (full text, mbox, reply):
Source: python3.5
Source-Version: 3.5.1-8
We believe that the bug you reported is fixed in the latest version of
python3.5, 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 815864@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <doko@ubuntu.com> (supplier of updated python3.5 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 ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 18 Mar 2016 16:12:19 +0100
Source: python3.5
Binary: python3.5 python3.5-venv libpython3.5-stdlib python3.5-minimal libpython3.5-minimal libpython3.5 python3.5-examples python3.5-dev libpython3.5-dev libpython3.5-testsuite idle-python3.5 python3.5-doc python3.5-dbg libpython3.5-dbg
Architecture: source all amd64
Version: 3.5.1-8
Distribution: unstable
Urgency: medium
Maintainer: Matthias Klose <doko@debian.org>
Changed-By: Matthias Klose <doko@ubuntu.com>
Description:
idle-python3.5 - IDE for Python (v3.5) using Tkinter
libpython3.5 - Shared Python runtime library (version 3.5)
libpython3.5-dbg - Debug Build of the Python Interpreter (version 3.5)
libpython3.5-dev - Header files and a static library for Python (v3.5)
libpython3.5-minimal - Minimal subset of the Python language (version 3.5)
libpython3.5-stdlib - Interactive high-level object-oriented language (standard library
libpython3.5-testsuite - Testsuite for the Python standard library (v3.5)
python3.5 - Interactive high-level object-oriented language (version 3.5)
python3.5-dbg - Debug Build of the Python Interpreter (version 3.5)
python3.5-dev - Header files and a static library for Python (v3.5)
python3.5-doc - Documentation for the high-level object-oriented language Python
python3.5-examples - Examples for the Python language (v3.5)
python3.5-minimal - Minimal subset of the Python language (version 3.5)
python3.5-venv - Interactive high-level object-oriented language (pyvenv binary, v
Closes: 815014 815864 816299
Changes:
python3.5 (3.5.1-8) unstable; urgency=medium
.
* Update to 20160318 from the 3.5 branch.
* Fix python3-venv with updated python-pip packages (Barry Warsaw).
Closes: #815014, #815864.
* Fix generating devhelp documentation (Simon McVittie).
Closes: #816299. LP: #1553633.
Checksums-Sha1:
ce2423091be14b9470f368331ca6b2c2ae3fa1d9 3247 python3.5_3.5.1-8.dsc
2bb2728aa4e17dc60e23e599704297233ea57cd3 445096 python3.5_3.5.1-8.debian.tar.xz
aac1be779c37ed207de70e80c8c31de1f11eea79 93602 idle-python3.5_3.5.1-8_all.deb
166d2a3e785533bd3baf5645898fd324eff73d64 8562418 libpython3.5-dbg_3.5.1-8_amd64.deb
54cd7eb57717d39aa006985602bbcac7edb82abd 37272300 libpython3.5-dev_3.5.1-8_amd64.deb
94a3ffb4b3fe3c553849b112ead79da5fcf78dcd 557830 libpython3.5-minimal_3.5.1-8_amd64.deb
a34982a222dcd0f4f94d137cfd5eb90a1908bba3 2119632 libpython3.5-stdlib_3.5.1-8_amd64.deb
52e2424ef0faf676af70eedc5b042675755b7787 2563630 libpython3.5-testsuite_3.5.1-8_all.deb
08f1c3c03574eb8a2beb1f6499a0588ab0225232 1359730 libpython3.5_3.5.1-8_amd64.deb
319751a7d29fc97818f0ce12482f80268a6826ef 10616212 python3.5-dbg_3.5.1-8_amd64.deb
880fbe3a70df178897a8e6c5b6e7692c24f92239 413268 python3.5-dev_3.5.1-8_amd64.deb
75c23e156bc2ae94001f945e787518602482e823 5220952 python3.5-doc_3.5.1-8_all.deb
baff26c749094910757b28d568ff895d61ac3c07 485954 python3.5-examples_3.5.1-8_all.deb
0a0d13f9552faeb117d3ff60787bc4948ef65425 1597458 python3.5-minimal_3.5.1-8_amd64.deb
74628990ab2d6eecb3435843fc5378e4be15efa0 5950 python3.5-venv_3.5.1-8_amd64.deb
27dc033e85cd501e88e69d0ecf8d5c957e5437e7 197432 python3.5_3.5.1-8_amd64.deb
Checksums-Sha256:
56c1b8ff6c26457e313bdd56bd9670693e8b2198041de51a4844d1f8988fe506 3247 python3.5_3.5.1-8.dsc
606c067f2cbadd96d6515822209e9eabab2017192731a02229075e7db0bffbaa 445096 python3.5_3.5.1-8.debian.tar.xz
e4a699324d3664dfdb84c511a16a4a17cd3469a337d8427b2310ca3ff1eda4da 93602 idle-python3.5_3.5.1-8_all.deb
b00743807d0fdeb0577fd9a9c99b0917a392f07aa1dc8fa887058fd4c6142827 8562418 libpython3.5-dbg_3.5.1-8_amd64.deb
a1c7abf8b9aac01feabd1b534cc82036f98be8df217e0ba60413f2feb5e028fa 37272300 libpython3.5-dev_3.5.1-8_amd64.deb
f879f1393fcdb3ba13ca85db2a861ade96ca9e81843a549b99b02e240503987c 557830 libpython3.5-minimal_3.5.1-8_amd64.deb
9345c5abca4f6f3080773391664ac42d3954f52b6eaa5732a10bd50d3410971b 2119632 libpython3.5-stdlib_3.5.1-8_amd64.deb
af90db32775f82d835538ad6b86fa51df8b8fc0dc74554759530ed82252dc74c 2563630 libpython3.5-testsuite_3.5.1-8_all.deb
dbfca8997cba838372574c20cb5eed453371abe7d2b9c76cd636adc4ef92a2ec 1359730 libpython3.5_3.5.1-8_amd64.deb
31ff366b1687472d7fdb9f34b3a7845a244900db4aa252199d57204ecff7fba5 10616212 python3.5-dbg_3.5.1-8_amd64.deb
6ff909555ccab46f60a336e36f59206297d50c7de5b3b6354b9dc5368f6b3963 413268 python3.5-dev_3.5.1-8_amd64.deb
a149fa4de49a95629c06d6137eb59a492f3138c31e43486e1cf6d26be464789d 5220952 python3.5-doc_3.5.1-8_all.deb
f09ddd3057b6bf474458d88f7751f09deee154b35616c7b8818122c1af3b25fe 485954 python3.5-examples_3.5.1-8_all.deb
38d75e8f89e3ee20c9b45d855252941f6a6cfa2e878cc1f7d5f0492e5997ecd2 1597458 python3.5-minimal_3.5.1-8_amd64.deb
c71a90fc768b3fcfb70fdcdbb6e46e451d1c94dbf8eef72e3c6faf3d5bb94fa8 5950 python3.5-venv_3.5.1-8_amd64.deb
02ac9aa64dbec703ce95a6b8c9c7aa25c34147bd5c6c1e33edbb0166d29d6388 197432 python3.5_3.5.1-8_amd64.deb
Files:
8f6bc853907d5ed8d6b657694e6b6c56 3247 python optional python3.5_3.5.1-8.dsc
205118f93680a11bdfb5d704969f0ec1 445096 python optional python3.5_3.5.1-8.debian.tar.xz
9d2d8adc0f457981f76aae5b29b83115 93602 python optional idle-python3.5_3.5.1-8_all.deb
9c37bc66419804f19eb94d85cf0344c7 8562418 debug extra libpython3.5-dbg_3.5.1-8_amd64.deb
c18ca3a24fb6d7b21172e2af6529e140 37272300 libdevel optional libpython3.5-dev_3.5.1-8_amd64.deb
38a267fea44dde9d622ae0538af68462 557830 python optional libpython3.5-minimal_3.5.1-8_amd64.deb
27be007cf8094790722f35d2760ea0b8 2119632 python optional libpython3.5-stdlib_3.5.1-8_amd64.deb
cbd79e8d80bcfad8925aa5fb9f41ee7d 2563630 libdevel optional libpython3.5-testsuite_3.5.1-8_all.deb
b6062dbfa967e2b9e02346ceb5a78ee7 1359730 libs optional libpython3.5_3.5.1-8_amd64.deb
735e9093e3bc6e31304d33fcf1d241af 10616212 debug extra python3.5-dbg_3.5.1-8_amd64.deb
c57096c123e01811f2f0d1c6367f459d 413268 python optional python3.5-dev_3.5.1-8_amd64.deb
ed4b39404842f2e1dfeb89b113b62a46 5220952 doc optional python3.5-doc_3.5.1-8_all.deb
01a78cbadfa77e347bcb7e1f5f5b6c71 485954 python optional python3.5-examples_3.5.1-8_all.deb
0a0dd62d2fdec58e21845fb84dea7b3c 1597458 python optional python3.5-minimal_3.5.1-8_amd64.deb
f121631225c8c8136c5760e35ddd517e 5950 python optional python3.5-venv_3.5.1-8_amd64.deb
0e5bbdac4e14dc8de8f400cbe12e293a 197432 python optional python3.5_3.5.1-8_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJW7CQFAAoJEL1+qmB3j6b1RtEQANCJswtTWh7b2ck+19knaKa0
eDFfm/mIrgwQnJcgwcWOgNYG9TxsOZk1jEgHHDmLoZ6qcx/ZZJGpmEAWiraICloS
UkXtzRbj2/lPOeVW0NbTF/1g/VVRzIvbCxPPjMokoM3/4943bs+h6XhLBaJZGujg
SnnyqCQwLod/t77TJYZ4Z/mF1LDGsDmPWF7IKrtHmaDKVDGlWc1KjlMFWLmCqvCd
yIsLs6CxJ5TWuTGrAMD4jPn7y1WVwMqWq2nz11HnTXUTp5TfbMrXRsFMvhlAx7wS
YlykuzGULX7FP5DXmxp+icRoBAdCKjBEQbPrMUgD6EgAVMA+75pNdvu9Oe/kfH8t
jxcdI39h8BWMK/Pw9M4ZlWKYFBctFbuiP6xDgCKB8YVWOaumk88v7jUfawfKtFxY
IDoAo1lfwtdVocsI7zes6gY2kkVSz/K5FhgkgU6YglCl1oGddd5WySg67H3BR9/E
HqfFeDiMhe8MUpw5k0oZW8WXatDSM62jnBwZnK+rr41AZE1wLQ+GS8L2s4jDs036
jpFSPxhLNRMuHU16S7o0WsWERIYv3oxoEqBp1stwAlMAMJlW/hN5ZRGZ80RYWio+
DOyAsvWvbkOj/ALEZ/q0ZAFouz/RR3xLl9M/uI6EXvo7UQaBzWX9e1mIsQIvgl8j
xAClR+kNL8zfd/OIKXNn
=L/v2
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Mon, 25 Apr 2016 07:35:17 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Jan 6 23:45:25 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.