-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[debian bookworm] Python Feature fails to install with 'error: externally-managed-environment' #577
Comments
Looks like the azure-cli (which attempts to install python) is effected the same way: https://github.com/devcontainers/features/actions/runs/5294360726/jobs/9583631989 |
Affirmative on azure-cli install being effected by this change on Debian bookworm as well: Azure/azure-cli#26737 and #589 Reverting to -bullseye, this is (for now) working fine. |
Add "version": "latest"
|
From what I can tell in the logs, specifically in this section:
That happens when installing a package directly with
This type of situation is usually avoided in development environments where developers will install libraries and packages in a virtualenv (which is also suggested). I tried looking around the scripts that are running this test but couldn't figure out what exactly is doing these installs, but happy to offer some more help here if needed |
Azure/azure-cli#26737 seems to use Other alternatives are listed here. Another alternative would be to use the system packages if |
I have similar issues when I try to install docker-outside-docker. I get the error: #13 32.44 error: externally-managed-environment
#13 32.44
#13 32.44 × This environment is externally managed
#13 32.44 ╰─> To install Python packages system-wide, try apt install
#13 32.44 python3-xyz, where xyz is the package you are trying to
#13 32.44 install.
#13 32.44
#13 32.44 If you wish to install a non-Debian-packaged Python package,
#13 32.44 create a virtual environment using python3 -m venv path/to/venv.
#13 32.44 Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
#13 32.44 sure you have python3-full installed.
#13 32.44
#13 32.44 If you wish to install a non-Debian packaged Python application,
#13 32.44 it may be easiest to use pipx install xyz, which will manage a
#13 32.44 virtual environment for you. Make sure you have pipx installed.
#13 32.44
#13 32.44 See /usr/share/doc/python3.11/README.venv for more information. Even if I install Update 20231031 Using the |
@SebastianBalle Do you know how to override this version to make the installation work on arm64? I tried editing devcontainer.json to look like this based on these docs: "features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
}, But that doesn't seem to work. |
We store the script hardcoded in our internal repository. We simply changed the default value as follow: DOCKER_DASH_COMPOSE_VERSION=${7:-"v2"} # v1 or v2 In our |
Opened #745 for tracking I should be able to get to #745 soon. Thanks for your patience. |
That's not sufficient. The python feature still fails to install on its own, regardless of whether or not any docker feature is installed. That is, the python feature is broken as well. |
Side note: Attempting to get a "partially working" feature install (mostly by disabling tool install) results in a broken setup. In particular, |
Yeah, I'm getting the same error with bookworm and v2: {
"name": "Rust",
"image": "mcr.microsoft.com/devcontainers/rust:bookworm",
"features": {
"ghcr.io/devcontainers-contrib/features/apt-get-packages:2": {
"packages": "software-properties-common, libzstd-dev"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
}
},
"overrideFeatureInstallOrder": [
"ghcr.io/devcontainers-contrib/features/apt-get-packages:2",
"ghcr.io/devcontainers/features/docker-in-docker:2"
],
"appPort": "9042:9042",
"remoteUser": "root",
"onCreateCommand": "",
"privileged": true,
"customizations": {
"vscode": {
"extensions": [
"1YiB.rust-bundle",
"panicbit.cargo"
]
}
},
} |
ref: #576
Test run: https://github.com/devcontainers/features/actions/runs/5293497423/jobs/9581722477#step:4:1608
The text was updated successfully, but these errors were encountered: