Question

I have website running successfully all models, views, admin all functional. Now isntalled GeoIP by manual added to the settings.py.

I ran the command

python2.7 manage.py syncdb

Creating tables ...
Creating table django_geoip_country
Creating table django_geoip_region
Creating table django_geoip_city
Creating table django_geoip_iprange
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Ran the 2nd command

python manage.py geoip_update

Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

Not sure what is wrong here are the docs:

http://django-geoip.readthedocs.org/en/latest/installation.html

Was it helpful?

Solution

It looks like you used python2.7 to run syncdb by python to run geoip_update, does the issue resolve itself running the following?

python2.7 manage.py geoip_update

You can check that python and python2.7 are in fact the same command by running which:

which python
which python2.7

I would recommend using virtualenv to maintain project dependencies and avoid python versioning issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top