CentOS 8/9 - Python Install Requirements #10539

Closed
opened 2025-12-29 21:32:52 +01:00 by adam · 6 comments
Owner

Originally created by @bd5872 on GitHub (Dec 3, 2024).

Change Type

Correction

Area

Installation/upgrade

Proposed Changes

Given that Netbox now requires python 3.10+ and Red Hat defaults to Python 3.6 in RHEL 8 and Python 3.9 in RHEL 9, although 3.11 is available (but not default) in the system repos since 8.8 and 9.2, and 3.12 since 9.4.

On the "Installation & Upgrade" / "3. Netbox" page, under the "Install System Packages" section - the python installation steps may need modification for RHEL-derived/CentOS systems, as the correct Python version will need explicitly installing (with the devel package as well, else psycopg fails to build during the 'Run the Upgrade Script' section):

Python 3.11 on RHEL8 or RHEL9:
sudo dnf install -y python3.11 python3.11-devel

Python 3.12 on RHEL9:
sudo dnf install -y python3.12 python3.12-devel

(In theory RHEL10 & derived distros shouldn't be an issue as they have 3.12 by default).

Originally created by @bd5872 on GitHub (Dec 3, 2024). ### Change Type Correction ### Area Installation/upgrade ### Proposed Changes Given that Netbox now requires python 3.10+ and Red Hat defaults to Python 3.6 in RHEL 8 and Python 3.9 in RHEL 9, although 3.11 is available (but not default) in the system repos since 8.8 and 9.2, and 3.12 since 9.4. On the "Installation & Upgrade" / "3. Netbox" page, under the "Install System Packages" section - the python installation steps may need modification for RHEL-derived/CentOS systems, as the correct Python version will need explicitly installing (with the devel package as well, else psycopg fails to build during the 'Run the Upgrade Script' section): Python 3.11 on RHEL8 or RHEL9: sudo dnf install -y python3.11 python3.11-devel Python 3.12 on RHEL9: sudo dnf install -y python3.12 python3.12-devel (In theory RHEL10 & derived distros shouldn't be an issue as they have 3.12 by default).
adam added the type: documentation label 2025-12-29 21:32:52 +01:00
adam closed this issue 2025-12-29 21:32:52 +01:00
Author
Owner

@litebito commented on GitHub (Jan 8, 2025):

Hi,
maybe also add the correct way to ensure Python 3.10+ is used with/for Netbox while avoiding breaking the system python.
(I tried with "alternatives" but that seems to break the system python, still looking for the correct solution)

@litebito commented on GitHub (Jan 8, 2025): Hi, maybe also add the correct way to ensure Python 3.10+ is used with/for Netbox while avoiding breaking the system python. (I tried with "alternatives" but that seems to break the system python, still looking for the correct solution)
Author
Owner

@hagbarddenstore commented on GitHub (Jan 9, 2025):

Hi, maybe also add the correct way to ensure Python 3.10+ is used with/for Netbox while avoiding breaking the system python. (I tried with "alternatives" but that seems to break the system python, still looking for the correct solution)

Specify the correct Python version when running the upgrade-script, this will install the specified version into the virtual environment it sets up.

PYTHON=python3.11 ./upgrade.sh

@hagbarddenstore commented on GitHub (Jan 9, 2025): > Hi, maybe also add the correct way to ensure Python 3.10+ is used with/for Netbox while avoiding breaking the system python. (I tried with "alternatives" but that seems to break the system python, still looking for the correct solution) Specify the correct Python version when running the upgrade-script, this will install the specified version into the virtual environment it sets up. `PYTHON=python3.11 ./upgrade.sh`
Author
Owner

@litebito commented on GitHub (Jan 13, 2025):

@hagbarddenstore thanks

@litebito commented on GitHub (Jan 13, 2025): @hagbarddenstore thanks
Author
Owner

@github-actions[bot] commented on GitHub (Apr 25, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Apr 25, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Apr 25, 2025):

We've decided to remove the CentOS-specific instructions from the installation documentation (see #19327).

@jeremystretch commented on GitHub (Apr 25, 2025): We've decided to remove the CentOS-specific instructions from the installation documentation (see #19327).
Author
Owner

@litebito commented on GitHub (Apr 27, 2025):

Would you consider adding generic instructions for RedHat "flavor" distributions? I already wrote some setup steps (python, postgres, netbox, ...) for my company. Most instructions are not CentOS specific. Limiting to Debian based OS only cuts out a significant part of the open source community.

@litebito commented on GitHub (Apr 27, 2025): Would you consider adding generic instructions for RedHat "flavor" distributions? I already wrote some setup steps (python, postgres, netbox, ...) for my company. Most instructions are not CentOS specific. Limiting to Debian based OS only cuts out a significant part of the open source community.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10539