1

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 ?

Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307

2 Answers2

1

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.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
madisvain
  • 259
  • 1
  • 2
  • Actually easy_install installs for Python 2.7 (without using easy_install-2.7) but now it seems more inclined to use pip, that's why I am using it. – Pierre de LESPINAY Dec 27 '11 at 10:01
  • Yes, pip seems to be the future. I have not had this problem myself but I imagine that you had pip installed for 2.6 at first so it has to be reconfigured. See if pip points to the right python version itself. – madisvain Dec 27 '11 at 10:10
0

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
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307