Jupyter Notebook script, advanced settings, error: externally-managed-environment #1295

Closed
opened 2025-11-20 05:07:45 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @tjakubo on GitHub (Jun 19, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Jupyter Notebook

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/jupyternotebook.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

The script lists Ubuntu 24.04
The server is running Proxmox VE 8.3.5 with a kernel Linux 6.8.12-9-pve (2025-03-16T19:18Z)

📝 Provide a clear and concise description of the issue.

When ran with default settings, no error occurs.

When ran with advanced settings and everything left at default, listed error is

[ERROR] in line 51: exit code 0: while executing command "$@" > /dev/null 2>&1
The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.
/dev/fd/63: line 74: SPINNER_PID: unbound variable

When ran with advanced settings and everything left at default except for Verbose Mode set to On, listed error is
<<see below in the Paste the full error output section>>

🔄 Steps to reproduce the issue.

(non-default options set as bold)
Choose an option: 3 Advanced Settings
Choose Type: 1 Unprivileged
Set Root Password:
Set Container ID: 100
Set Hostname: jupyternotebook
Set Disk Size in GB: 4
Allocate CPU Cores: 2
Allocate RAM in MiB: 2048
Select network bridge: vmbr0 Bridge
Set a Static IPv4 CIDR Address (/24): dhcp
Set APT-Cacher IP:
Disable IPv6?: No
Set Interface MTU Size:
Set a DNS Search Domain:
Set a DNS Server IP:
Set a MAC Address:
Set a Vlan:
Set Custom Tags?: community-script;ai;dev-tools
SSH Authorized key for root:
Enable FUSE support?: No
Enable Verbose Mode?: Yes

Paste the full error output (if available).

Processing triggers for systemd (255.4-1ubuntu8.8) ...
Processing triggers for man-db (2.12.0-4build2) ...
⠴Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
✔️ Installed Dependencies
⠸error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

[ERROR] in line 23: exit code 0: while executing command $STD pip3 install jupyter
/dev/fd/63: line 74: SPINNER_PID: unbound variable
root@cx61:~#

🖼️ Additional context (optional).

No response

Originally created by @tjakubo on GitHub (Jun 19, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Jupyter Notebook ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/jupyternotebook.sh)" ### ⚙️ What settings are you using? - [ ] Default Settings - [x] Advanced Settings ### 🖥️ Which Linux distribution are you using? The script lists Ubuntu 24.04 The server is running Proxmox VE 8.3.5 with a kernel Linux 6.8.12-9-pve (2025-03-16T19:18Z) ### 📝 Provide a clear and concise description of the issue. When ran with default settings, no error occurs. When ran with advanced settings and everything left at default, listed error is > [ERROR] in line 51: exit code 0: while executing command "$@" > /dev/null 2>&1 > The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output. > /dev/fd/63: line 74: SPINNER_PID: unbound variable When ran with advanced settings and everything left at default except for Verbose Mode set to On, listed error is <<see below in the **Paste the full error output** section>> ### 🔄 Steps to reproduce the issue. (non-default options set as bold) **Choose an option: 3 Advanced Settings** Choose Type: 1 Unprivileged Set Root Password: <blank> Set Container ID: 100 Set Hostname: jupyternotebook Set Disk Size in GB: 4 Allocate CPU Cores: 2 Allocate RAM in MiB: 2048 Select network bridge: vmbr0 Bridge Set a Static IPv4 CIDR Address (/24): dhcp Set APT-Cacher IP: <blank> Disable IPv6?: No Set Interface MTU Size: <blank> Set a DNS Search Domain: <blank> Set a DNS Server IP: <blank> Set a MAC Address: <blank> Set a Vlan: <blank> Set Custom Tags?: community-script;ai;dev-tools SSH Authorized key for root: <blank> Enable FUSE support?: No **Enable Verbose Mode?: Yes** ### ❌ Paste the full error output (if available). Processing triggers for systemd (255.4-1ubuntu8.8) ... Processing triggers for man-db (2.12.0-4build2) ... ⠴Processing triggers for mailcap (3.70+nmu1ubuntu1) ... ✔️ Installed Dependencies ⠸error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.12/README.venv for more information. note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. ⠼ [ERROR] in line 23: exit code 0: while executing command $STD pip3 install jupyter /dev/fd/63: line 74: SPINNER_PID: unbound variable root@cx61:~# ### 🖼️ Additional context (optional). _No response_
saavagebueno added the bug label 2025-11-20 05:07:45 -05:00
Author
Owner

@MickLesk commented on GitHub (Jun 19, 2025):

Update?

Then Look at #555

@MickLesk commented on GitHub (Jun 19, 2025): Update? Then Look at #555
Author
Owner

@tjakubo commented on GitHub (Jun 19, 2025):

Update?

Then Look at #555

Sorry, I'm new to this, do you mean I should update the Proxmox host? The link you provided mentions this issue when an LXC is updated, but I'm creating a new one in this case and getting this error.

From #555:

If you install new scripts or update LXCs using the LXC updater script you will not have this problem.

@tjakubo commented on GitHub (Jun 19, 2025): > Update? > > Then Look at [#555](https://github.com/community-scripts/ProxmoxVE/discussions/555) Sorry, I'm new to this, do you mean I should update the Proxmox host? The link you provided mentions this issue when an LXC is updated, but I'm creating a new one in this case and getting this error. From #555: > If you install new scripts or update LXCs using the [LXC updater script](https://community-scripts.github.io/ProxmoxVE/scripts?id=update-lxcs) you will not have this problem.
Author
Owner

@MickLesk commented on GitHub (Jun 19, 2025):

You get an issue by creating? Strange that issue is clear from an Update.

Run full verbose output

@MickLesk commented on GitHub (Jun 19, 2025): You get an issue by creating? Strange that issue is clear from an Update. Run full verbose output
Author
Owner

@MickLesk commented on GitHub (Jun 20, 2025):

Script is refactored with #5320 try again

@MickLesk commented on GitHub (Jun 20, 2025): Script is refactored with #5320 try again
Author
Owner

@tjakubo commented on GitHub (Jun 20, 2025):

I tried reproducing today for a full log and it stopped erroring, thought I was going mad, didn't expect it fixed that fast :)

Thanks a lot!

@tjakubo commented on GitHub (Jun 20, 2025): I tried reproducing today for a full log and it stopped erroring, thought I was going mad, didn't expect it fixed that fast :) Thanks a lot!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1295