Venv + upgrade.sh = python3 not found #7188

Closed
opened 2025-12-29 20:20:17 +01:00 by adam · 0 comments
Owner

Originally created by @PenelopeFudd on GitHub (Nov 1, 2022).

Originally assigned to: @arthanson on GitHub.

Change Type

Addition

Area

Installation/upgrade

Proposed Changes

When installing, if you've activated the python virtual environment and if your sudo is configured to preserve the environment, running update.sh will fail, because update.sh deletes the virtualenv and the python3 in it:

# sudo /opt/netbox/upgrade.sh

Using Python 3.8.10
Removing old virtual environment...
Creating a new virtual environment at /opt/netbox-3.3.6/venv...
/opt/netbox/upgrade.sh: line 42: /opt/netbox-3.3.6/venv/bin/python3: No such file or directory

If you could modify the documentation to say "run 'deactivate' before running 'sudo update.sh'", then the problem will go away.

Thanks!

Originally created by @PenelopeFudd on GitHub (Nov 1, 2022). Originally assigned to: @arthanson on GitHub. ### Change Type Addition ### Area Installation/upgrade ### Proposed Changes When installing, if you've activated the python virtual environment and if your sudo is configured to preserve the environment, running update.sh will fail, because update.sh deletes the virtualenv and the python3 in it: ``` # sudo /opt/netbox/upgrade.sh Using Python 3.8.10 Removing old virtual environment... Creating a new virtual environment at /opt/netbox-3.3.6/venv... /opt/netbox/upgrade.sh: line 42: /opt/netbox-3.3.6/venv/bin/python3: No such file or directory ``` If you could modify the documentation to say "run 'deactivate' before running 'sudo update.sh'", then the problem will go away. Thanks!
adam added the type: documentation label 2025-12-29 20:20:17 +01:00
adam closed this issue 2025-12-29 20:20:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7188