AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 783138
Accepted
Chris Stryczynski
Chris Stryczynski
Asked: 2024-09-06 23:48:24 +0800 CST2024-09-06 23:48:24 +0800 CST 2024-09-06 23:48:24 +0800 CST

在 Debian 12 上安装 python3.11-venv 时遇到问题

  • 772

我在尝试让 virtualenv 在 Debian 12 上运行时遇到了一些问题,很难弄清楚到底是什么问题。我已经运行过了,apt update而且apt upgrade这是几天前刚刚在网络上安装的 Debian。

$ python3 -m venv code_execution_env
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 python3.11-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: /home/chris/projects/claude-engineer/code_execution_env/bin/python3
$ sudo apt install -y python3.11-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3.11-venv : Depends: python3.11 (= 3.11.2-6+deb12u2) but 3.11.2-6+deb12u3 is to be installed
E: Unable to correct problems, you have held broken packages.

我也尝试过python3-venv,python3.11-full但没有成功:

$ sudo apt-get install python3.11-full
[sudo] password for chris: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3.11-full : Depends: python3.11 (= 3.11.2-6+deb12u2) but 3.11.2-6+deb12u3 is to be installed
                   Depends: python3.11-venv (= 3.11.2-6+deb12u2) but it is not going to be installed
                   Recommends: python3.11-doc but it is not going to be installed
                   Recommends: python3.11-examples but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

apt-缓存策略:

$ apt-cache policy python3.11 python3.11-venv
python3.11:
  Installed: 3.11.2-6+deb12u3
  Candidate: 3.11.2-6+deb12u3
  Version table:
 *** 3.11.2-6+deb12u3 100
        100 /var/lib/dpkg/status
     3.11.2-6+deb12u2 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
python3.11-venv:
  Installed: (none)
  Candidate: 3.11.2-6+deb12u2
  Version table:
     3.11.2-6+deb12u2 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages

尝试过apt --fix-broken install:

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

任何指示都会有帮助,很难知道这是否只是一些 python 打包问题或者也许我需要进一步关注确切的错误python3.11-venv : Depends: python3.11 (= 3.11.2-6+deb12u2) but 3.11.2-6+deb12u3 is to be installed。

https://tracker.debian.org/pkg/python3.11还指出了一些相关内容:

软件包已消失 此软件包不在任何开发存储库中。这可能意味着该软件包已被删除(或已重命名)。因此,此处的信息并不重要...除非有人接管并重新引入它,否则该软件包将会消失。

debian
  • 1 1 个回答
  • 57 Views

1 个回答

  • Voted
  1. Best Answer
    GAD3R
    2024-09-09T02:02:27+08:002024-09-09T02:02:27+08:00

    根据输出apt policy,您的 中缺少安全 repo sources.list。

    按照Debian wiki 上的示例进行编辑,添加sources.list以下行:

    deb http://security.debian.org/debian-security bookworm-security main 
    

    然后运行:

    sudo apt update && sudo apt dist-upgrade
    sudo apt install -y python3.11-venv
    

    软件包:python3.11-venv (3.11.2-6+deb12u3) [安全]

    • 2

相关问题

  • GRUB 配置以识别同一 Linux 发行版的不同桌面环境(安装)

  • astyle 不会更改源文件格式

  • 接收有关全新 Debian 的电子邮件

  • Debian Stretch:libgs_plugin_systemd-updates.so 中的 gnome-software 段错误

  • 如何在拼音输入法中输入ü?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve