Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango not installed in virtualenv, --no-site-packages flag not correcting the issue
    primarykey
    data
    text
    <p>The problem I'm having is similar to <a href="https://stackoverflow.com/questions/7976089/pip-virtualenv-django-installation-issue">pip / virtualenv / django installation issue</a>, but the solution posted in that answer is not working for me.</p> <p>I have created a virtual environment with --no-site-packages using:</p> <pre><code>virtualenv venv --distribute --no-site-packages </code></pre> <p>But when I activate the environment and attempt to install django (sudo pip install django), I get the message:</p> <pre><code>teddy@coolermaster:~/heroku/battle/hellodjango$ source venv/bin/activate (venv)teddy@coolermaster:~/heroku/battle/hellodjango$ sudo pip install Django Requirement already satisfied (use --upgrade to upgrade): Django in /usr/local/lib/python2.7/dist-packages Cleaning up... </code></pre> <p>Note that in the above message, pip has found the django installation in my local "dist-packages" folder, not my "site-packages"</p> <p>And if I try importing django in a python interpreter I get the error: "No module named django."</p> <p>Should I be using the command "pip install django" instead of "sudo pip install django"? When I try running "pip install django" I am greeted by "OSError: [Errno 13] Permission denied: '/home/teddy/heroku/battle/hellodjango/venv/build'"</p> <p>Could the problem be permissions related (because I am using sudo)? If so why won't it allow me to pip install without sudo? Or could the issue be that my virtualenv is ignoring site-packages but still using the source in my dist-packages?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload