Skip to content
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

python bwrap: Creating new namespace failed #18

Open
alex-fu27 opened this issue Jun 18, 2024 · 2 comments
Open

python bwrap: Creating new namespace failed #18

alex-fu27 opened this issue Jun 18, 2024 · 2 comments

Comments

@alex-fu27
Copy link

With my home-manager config:

programs.scientific-fhs = {
enable = true;
enableNVIDIA = false;
juliaVersions = [ {
	version = "1.10.1";
	default = true;
} ];
};

When I try to run python, I get:

$ python3
bwrap: Creating new namespace failed: nesting depth or /proc/sys/user/max_*_namespaces exceeded (ENOSPC)

Julia works fine, on the other hand.

The possible explanation which comes to my mind is that Python might be calling another python from ~/.nix-profile/bin/python, which would spawn a nested bwrap.

@fivegrant
Copy link
Contributor

fivegrant commented Jun 18, 2024

what happens if you run it in a nix shell nixpkgs#python3? i encounter this issue as well but i also don't have a system-wide installation of python. it works fine though when i build an application or shell.

@alex-fu27
Copy link
Author

No, doesn't happen with nix shell nixpkgs#python3. But I found where the recursion comes from:
If you call python3 from scientific-fhs (~/.nix-profile/bin/python3), then this will execute bwrap with a /nix/store/*-python3-init, which is a shell script that sets up an /etc/ld.so.conf file and finally calls exec python3 "$@ which resolves to ~/.nix-profile/bin/python3 again, leading to the recursion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants