Package: python3.8-venv
Version: 3.8.7-1
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?

trying to create a venv with python3.8 on debian sid with

python3.8 -m venv myvenv

gave the output

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.

Failing command: ['/home/user/myvenv/bin/python3.8', '-Im', 'ensurepip', '--
upgrade', '--default-pip']


* What exactly did you do (or not do) that was effective (or
ineffective)?

creating a venv doesn't work. I installed python3-venv and
python3.8-venv.
Adding some tracing to the catchall try/except in
/usr/lib/python3.8/venv/__init__.py line 297 yields this traceback:

Traceback (most recent call last):
File "<string>", line 6, in <module>
File "/usr/lib/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/tmp1c9rl_l_/pip-20.1.1-py2.py3-none-any.whl/pip/__main__.py", line
23, in <module>
File "<frozen zipimport>", line 259, in load_module
File "/tmp/tmp1c9rl_l_/pip-20.1.1-py2.py3-none-
any.whl/pip/_internal/cli/main.py", line 10, in <module>
File "<frozen zipimport>", line 259, in load_module
File "/tmp/tmp1c9rl_l_/pip-20.1.1-py2.py3-none-
any.whl/pip/_internal/cli/autocompletion.py", line 9, in <module>
File "<frozen zipimport>", line 259, in load_module
File "/tmp/tmp1c9rl_l_/pip-20.1.1-py2.py3-none-
any.whl/pip/_internal/cli/main_parser.py", line 7, in <module>
File "<frozen zipimport>", line 259, in load_module
File "/tmp/tmp1c9rl_l_/pip-20.1.1-py2.py3-none-
any.whl/pip/_internal/cli/cmdoptions.py", line 19, in <module>
ModuleNotFoundError: No module named 'distutils.util'
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.8/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/usr/lib/python3.8/ensurepip/__init__.py", line 265, in _main
return _bootstrap(
File "/usr/lib/python3.8/ensurepip/__init__.py", line 183, in _bootstrap
return _run_pip(args + _PROJECTS, additional_paths)
File "/usr/lib/python3.8/ensurepip/__init__.py", line 61, in _run_pip
return subprocess.run([sys.executable, "-c", code], check=True).returncode
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/user/myvenv/bin/python3.8',
'-c', '\nimport runpy\nimport sys\nsys.path =
[\'/tmp/tmp1c9rl_l_/setuptools-44.0.0-py2.py3-none-any.whl\',
\'/tmp/tmp1c9rl_l_/pip-20.1.1-py2.py3-none-any.whl\',
\'/tmp/tmp1c9rl_l_/pkg_resources-0.0.0-py2.py3-none-any.whl\'] +
sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--
find-links\', \'/tmp/tmp1c9rl_l_\', \'--upgrade\', \'setuptools\', \'pip\',
\'pkg_resources\']\nrunpy.run_module("pip", run_name="__main__",
alter_sys=True)\n']' returned non-zero exit status 1.


* What was the outcome of this action?
no venv.

* What outcome did you expect instead?

a virtual environment to be created.


Furthermore, I can run previously created virtualenv using python3.8, but I
can't install packages with pip, also with missing distutils errors.

I don't know if this is a bug or if it's to be expected on unstable. But it
seems to me that python version numbers started to change faster lately. What's
debian's policy for other versions of python than the latests ? If older
version have no support, is there a debian way to work with multiple versions?
Or should I use something like pyenv for those cases?

Thanks,

Urs



*** End of the template - remove these template lines ***



-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-sndpatch1+ (SMP w/48 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, 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.8-venv depends on:
ii python-pip-whl 20.1.1-2
ii python3.8 3.8.7-1

python3.8-venv recommends no packages.

python3.8-venv suggests no packages.

-- no debconf information

Reply via email to