Estou tendo alguns problemas tentando fazer o virtualenv funcionar no debian 12, é difícil decifrar qual é exatamente o problema. Eu executei apt update
e apt upgrade
também, é uma instalação de rede nova do Debian de apenas alguns dias atrás.
$ 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.
Eu também tentei python3-venv
, em vez disso, python3.11-full
pacote, mas sem sorte:
$ 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.
política do apt-cache:
$ 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
Testado 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
Qualquer dica seria útil, é difícil saber se isso é apenas um problema de empacotamento do Python ou se talvez eu precise me concentrar mais no erro exato 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 também afirma algo preocupante:
pacote desapareceu Este pacote não está em nenhum repositório de desenvolvimento. Isso provavelmente significa que o pacote foi removido (ou foi renomeado). Portanto, as informações aqui são de pouco interesse... o pacote vai desaparecer a menos que alguém o tome e o reintroduza.