Netbox didn't install all required libraries by itslef. #7833

Closed
opened 2025-12-29 20:28:46 +01:00 by adam · 1 comment
Owner

Originally created by @thecowmilk on GitHub (Mar 31, 2023).

NetBox version

v3.4.7

Python version

3.11

Steps to Reproduce

Follow the documentation.

Expected Behavior

By following the documentation it should have installed all python django libs by default when running the "upgrade.sh" script.

Observed Behavior

sudo python3 manage.py createsuperuser
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/lib/python3/dist-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/lib/python3/dist-packages/django/core/management/init.py", line 395, in execute
django.setup()
File "/usr/lib/python3/dist-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/apps/config.py", line 224, in create
import_module(entry)
File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_filters'

And it wasn't the only one. I won't manually install not even a single more lib.

Originally created by @thecowmilk on GitHub (Mar 31, 2023). ### NetBox version v3.4.7 ### Python version 3.11 ### Steps to Reproduce Follow the documentation. ### Expected Behavior By following the documentation it should have installed all python django libs by default when running the "upgrade.sh" script. ### Observed Behavior sudo python3 manage.py createsuperuser Traceback (most recent call last): File "/opt/netbox/netbox/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 395, in execute django.setup() File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/django/apps/config.py", line 224, in create import_module(entry) File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked ModuleNotFoundError: No module named 'django_filters' And it wasn't the only one. I won't manually install not even a single more lib.
adam closed this issue 2025-12-29 20:28:46 +01:00
Author
Owner

@abhi1693 commented on GitHub (Mar 31, 2023):

You need to run the commands from the virtual environment instead where the libraries are installed. This is documented as well

image

@abhi1693 commented on GitHub (Mar 31, 2023): You need to run the commands from the virtual environment instead where the libraries are installed. This is documented as well ![image](https://user-images.githubusercontent.com/5083532/229143676-e4d2f082-63a2-4b6e-b60b-ec6658bbcccc.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7833