Error when installing Django using pythonbrew
Question: I am currently facing an issue when trying to install Django using pythonbrew.

My system is running ubuntu 12.04 (LTS) and I am following these instructions
to get django running:

<http://www.tangowithdjango.com/book/chapters/requirements.html#installing-
software>

I have followed everything exactly as specified by the book but when it comes
time to use Django on my pythonbrew version of Python, I get this error:

Traceback (most recent call last): File "", line 1, in ImportError: No module
named django

So I decided to do some investigating and I went into the folder that is now
specified as my PYTHONPATH for adding additional libraries, which is:

./.pythonbrew/pythons/Python-2.7.5/lib/python2.7/site-packages (I've left out
the above 2 folder levels, but my PYTHONPATH is correct, confirmed by echo
$PYTHONPATH)

In the site-packages folder, there is nothing there, which explains the Django
error.

So I switched off pythonbrew and then ran python and then 'import django' and
it worked.

This likely means that when trying to install stuff to Python, it is probably
not using the PYTHONPATH for some reason (or maybe something else).

I have taken a look here:

1) [Error after installing Django (supposed PATH or PYTHONPATH
"error")](http://stackoverflow.com/questions/2935723/error-after-installing-
django-supposed-path-or-pythonpath-error) (the solution and question seems
very different to mine, with slight similarities)

2) [how to install additional python packages with
pythonbrew](http://stackoverflow.com/questions/9217687/how-to-install-
additional-python-packages-with-pythonbrew) (the guy didn't get a response and
did a hack)

3) <http://suvashthapaliya.com/blog/2012/01/sandboxed-python-virtual-
environments/> (this guy recommends using virtualenv to create a virtual
environment before installing packages)

I'm not sure what to do now and I suspect the error is either with my
PYTHONPATH or there's some permission error that is causing all my installed
packages to go to the root python installation instead of the pythonbrew
package.

Any assistance will be greatly appreciated (also, this isn't a unique problem,
as I expect many others to face this installation issue with pythonbrew and
django).


Answer: I'm new in Stack Overflow, so I couldn't comment on your answer above about
what you got when running

    
    
    pip -V
    

I had the same issue, but I fix it by doing what this post says:

[Using pip in pythonbrew](http://stackoverflow.com/questions/15096306/using-
pip-in-pythonbrew)

Hope this helps!

