Replies: 1 comment
-
You can read more in documentation about the python virtualenv feature but
$ source /opt/netbox-3.1.6/venv/bin/activate
Should enable all the non-standard module paths in your shell environment, then you should be able to run manage.py or pip list and it should use the self-contained python environment in venv
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: Almeus ***@***.***>
Sent: Wednesday, March 2, 2022 9:24 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Accessing the interactive nbshell (Discussion #8778)
I'm attempting to access the interactive nbshell. Per the documentation, I enter
./manage.py nbshell
The docs don't specify the folder, but I assume it's in /opt/netbox/netbox/ where the manage.py file is located.
However, upon running the command above, with or without sudo, I receive the error below:
Traceback (most recent call last): File "./manage.py", line 8, in <module> from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django'
I assumed all the necessary Python modules were installed when I ran the netbox install script. I run pip3 list to see what Python modules are installed, and Django is not among them. The web UI works perfectly fine, so I assume the dependencies are installed in a nonstandard location. I move to / and run find . -name *django* to find out where the modules might be. Most of the results turn up in /opt/netbox-3.1.6/venv/lib/python3.8/site-packages/
How can I run the interactive shell when it looks for the dependencies where they are not installed?
—
Reply to this email directly, view it on GitHub<#8778>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM3CH4ZOQQ23JBJOJLDU56BZXANCNFSM5PXYYETQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Almeus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm attempting to access the interactive nbshell. Per the documentation, I enter
./manage.py nbshell
The docs don't specify the folder, but I assume it's in
/opt/netbox/netbox/
where themanage.py
file is located.However, upon running the command above, with or without
sudo
, I receive the error below:Traceback (most recent call last): File "./manage.py", line 8, in <module> from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django'
I assumed all the necessary Python modules were installed when I ran the netbox install script. I run
pip3 list
to see what Python modules are installed, and Django is not among them. The web UI works perfectly fine, so I assume the dependencies are installed in a nonstandard location. I move to/
and runfind . -name *django*
to find out where the modules might be. Most of the results turn up in/opt/netbox-3.1.6/venv/lib/python3.8/site-packages/
How can I run the interactive shell when it looks for the dependencies where they are not installed?
Beta Was this translation helpful? Give feedback.
All reactions