[英]Trouble Installing Python3.6 Virtual Environment on Ubuntu 22.04
Virtual environment stopped being created after upgrading to Ubuntu 22.04.升级到 Ubuntu 22.04 后,虚拟环境停止创建。 Running the command virtualenv venv -p python3.6
produces an error that did not occur in the previous version - Ubuntu 20.04.:运行命令virtualenv venv -p python3.6
会产生以前版本中没有出现的错误 - Ubuntu 20.04.:
fail
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 84, in _get
result = get_wheel(
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/acquire.py", line 26, in get_wheel
wheel = from_bundle(distribution, version, for_py_version, search_dirs, app_data, do_periodic_update, env)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/bundle.py", line 13, in from_bundle
wheel = load_embed_wheel(app_data, distribution, for_py_version, of_version)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/bundle.py", line 33, in load_embed_wheel
wheel = get_embed_wheel(distribution, for_py_version)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/embed/__init__.py", line 77, in get_embed_wheel
raise Exception((
Exception: Wheel for pip for Python 3.6 is unavailable. apt install python3-pip-whl
pip-21.3.1-py3-none-any.whl already present in /home/su/.local/share/virtualenv/wheel/3.6/embed/3/pip.json
created virtual environment CPython3.6.15.final.0-64 in 3225ms
creator CPython3Posix(dest=/home/su/Downloads/courses-app/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/su/.local/share/virtualenv)
added seed packages: pip==21.3.1, setuptools==59.6.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Can anyone help solve this problem?任何人都可以帮助解决这个问题吗?
The issue was resolved after installing the following packages:安装以下软件包后问题已解决:
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.6
sudo apt install libpython3.6-dev
sudo apt install python3.6-distutils
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.