1π
It appears you need to install a C library in order to use GeoIP.
Here is a snippet from the file that is throwing that error.
# The shared library for the GeoIP C API. May be downloaded
# from http://www.maxmind.com/download/geoip/api/c/
if lib_path:
lib_name = None
else:
# TODO: Is this really the library name for Windows?
lib_name = 'GeoIP'
Once you have it installed somewhere you need to reference it in your settings.py
GEOIP_LIBRARY_PATH = '/whatever'
The library was trying to tell you this, but it seems that there is a bug that prevents it from raising the correct error. https://github.com/django/django/pull/103
1π
Previously i was facing this issue : from django.contrib.gis.geoip import GeoIP ImportError: cannot import name GeoIP
which is solved when i install this package.
yum install GeoIP-devel -y
π€Marthanda Anand
- [Answered ]-Building simlpe django firehose
- [Answered ]-Django enable anonymous user session
- [Answered ]-Django β how to exclude repeating objects
- [Answered ]-Nice pythonic way to specify django model field choices with extra attributes and methods
0π
The error is caused by moving the virtual environment folder.
The solution is to create the environment again and reinstall the pygeoip library.
π€user20573670
- [Answered ]-Overiding URL pattern from a third party app
- [Answered ]-Can't sync south in db
- [Answered ]-Django admin foreign key field cause performance issue
Source:stackexchange.com