./upgrade.sh fails when /usr/bin/python3 has too old version or does not exist #3635

Closed
opened 2025-12-29 18:30:17 +01:00 by adam · 2 comments
Owner

Originally created by @jannooo on GitHub (May 5, 2020).

Environment

  • Python version: 3.5 respectively 3.8.2
  • NetBox version: 2.8.1

Steps to Reproduce

  1. run ./upgrade.sh when /usr/bin/python3 does not exist or has an version <= 3.5

Expected Behavior

./upgrade.sh should use /usr/bin/env to determine the right python3 executable

Observed Behavior

./upgrade.sh fails

Originally created by @jannooo on GitHub (May 5, 2020). ### Environment * Python version: 3.5 respectively 3.8.2 * NetBox version: 2.8.1 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. run ./upgrade.sh when /usr/bin/python3 does not exist or has an version <= 3.5 ### Expected Behavior ./upgrade.sh should use /usr/bin/env to determine the right python3 executable ### Observed Behavior ./upgrade.sh fails
adam closed this issue 2025-12-29 18:30:17 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 5, 2020):

It is the user's responsibility to install a supported version of Python per the installation and upgrade documentation.

@jeremystretch commented on GitHub (May 5, 2020): It is the user's responsibility to install a supported version of Python per the installation and upgrade documentation.
Author
Owner

@jannooo commented on GitHub (May 5, 2020):

Well, what's the problem of using '/usr/bin/env python3' instead of hardcoding '/usr/bin/python3' as suggested in the PR?

As you said the user is responsible for installing the right version, but sometimes it is not possible to install a appropriate version in '/usr/bin/'

@jannooo commented on GitHub (May 5, 2020): Well, what's the problem of using '/usr/bin/env python3' instead of hardcoding '/usr/bin/python3' as suggested in the PR? As you said the user is responsible for installing the right version, but sometimes it is not possible to install a appropriate version in '/usr/bin/'
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3635