Question

I'm using Django 1.3 with Python 2.7 in Ubuntu.
Trying to install django-grappelli with pip

$ pip install django-grappelli

It apparently installs for Python 2.6 (the distribution version)

Requirement already satisfied: django-grappelli in /usr/local/lib/python2.6/dist-packages

Maybe because I installed pip with apt-get ?
How can I install grappelli for my Python 2.7 ?

Was it helpful?

Solution

Python 2.7 packages should be in a different place then Python 2.6 packages. For you then /usr/local/lib/python2.7/site-packages/ I think.

You can tell PIP to install into specific location by:

pip install --install-option="--prefix=/usr/local/lib/python2.7/site-packages/" django-grapelli

You can also use version specific commands to do the installation.

pip-2.7 install django-grapelli

If pip-2.7 command is not found use easy_install-2.7 to install pip.

OTHER TIPS

I have installed pip with Synaptic so it has been installed for the repos python version (2.6).
To correct this problem I had to uninstall pip with Synaptic and install it with easy_install

$ sudo apt-get --purge remove python-pip
$ sudo easy_install pip
$ sudo pip install django-grappelli
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top