12đź‘Ť
âś…
First, you should be setting up the virtualenv with --no-site-packages
:
virtualenv --no-site-packages …/my-env/
Then you should make sure that you’ve activated it:
. …/my-env/bin/activate
Or, with virtualenv helper:
workon my-env
Then install Django with:
pip install django
👤David Wolever
4đź‘Ť
Like David pointed out, you should tell virtualenv not to use packages outside your virtual environment (using the –no-site-packages flag). That’s why “which django-admin.py” returns “/usr/local/bin/django-admin.py”
👤César
- Can you use Python for both front end and back end using Django framework?
- Django WeasyPrint CSS integration warning: Relative URI reference without a base URI: <link href="/static/css/bootstrap.min.css"> at line None
- How do I update an object's members using a dict?
- How to test a model that has a foreign key in django?
Source:stackexchange.com