Skip to content

Cannot install django-auth-ldap inside venv #6506

Answered by candlerb
ejm110 asked this question in Q&A
Discussion options

You must be logged in to vote

sudo pip3 install django-auth-ldap

That doesn't work: it installs the package outside the venv, as you'll see in the next few lines:

Requirement already satisfied: ... in /usr/local/lib64/python3.6/site-packages

Solution 1: sudo to a root shell first, then activate venv.

sudo -s
. venv/bin/activate
pip install ...
exit

Solution 2 (better): add the package(s) you want to local_requirements.txt, and then run ./upgrade.sh as if upgrading. It will build a new venv, including your extra packages. And it will remember that this must be done when you upgrade Netbox in future.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ejm110
Comment options

Answer selected by ejm110
Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants