简体   繁体   English

Ubuntu 22.04安装Python3.6虚拟环境问题

[英]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.

相关问题 无法在 CentOS 7.8 和 python3.6 上创建虚拟环境 - Unable to create virtual environment on CentOS 7.8 and python3.6 使用我在 Google Cloud VM 上全新安装的 Python3.6 创建的虚拟环境 - Use the virtual environment created by my fresh install of Python3.6 on Google Cloud VM 在 ubuntu 22.04 上从系统安装的 python 中隔离虚拟环境依赖项 - Isolate virtual environment dependecies from system-installed python on ubuntu 22.04 如何在 ubuntu 16.04 上使用 virtualenv 和 python3.6? - How to use virtualenv with python3.6 on ubuntu 16.04? 如何在Ubuntu16.04 LTS上为python(2.7,3.5,3.6)设置虚拟环境? - How to setup virtual environment for python(2.7, 3.5, 3.6) on Ubuntu16.04 LTS? FileExistsError:[Errno 17]文件在创建虚拟环境时存在:'/root/analytics/venv-nerapi/lib/python3.6/lib-dynload' - FileExistsError: [Errno 17] File exists: '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload' while creating virtual environment 从 Python 3.6 中的虚拟环境导入 package - Importing package from a virtual environment in Python 3.6 python虚拟环境正在安装到/ usr /…? - python virtual environment is installing to /usr/…? 在虚拟环境中安装python软件包 - installing a python package in virtual environment 为Python虚拟环境安装freetds - Installing freetds for Python Virtual Environment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM