Error Was Cannot Import Name Geoip
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About pip install geoip Us Learn more about Stack Overflow the company Business Learn more about hiring
Importerror: Cannot Import Name Geoip
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the geoip path must be provided via parameter or the geoip_path setting. Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ImportError: cannot import name 'GeoIP' 'geoip.h' file not found up vote 0 down vote favorite I have installed GeoIP C library with brew install geoip and it was successfully. I also installed it through pip install geoip but when trying to import GeoIP from Django I get the following error: >>> from django.contrib.gis.geoip import GeoIP Traceback (most recent call last): File "
Geoip Django
question but it didn't answer my question though I know GeoIP library is installed. python django python-3.x geoip share|improve this question edited Jul 22 at 22:32 asked Jul 22 at 22:24 Daoro 82 Possible duplicate of Cannot import GeoIP module in Django –Random Davis Jul 22 at 22:26 @RandomDavis No, I have looked at that one and I have the library installed. So that doesn't answer my question. –Daoro Jul 22 at 22:31 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Browse other questions tagged python django python-3.x geoip or ask your own question. asked 2 months ago viewed 140 times Linked 5 Cannot import GeoIP module in Django Related 6using GeoIP with django on appengine6ImportError: cannot import name signals1Python/django : Cannot import GeoI
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us geoip.h: no such file or directory Learn more about Stack Overflow the company Business Learn more about hiring developers importerror cannot import name geoip2 or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question
Failed Building Wheel For Geoip
and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are http://stackoverflow.com/questions/38536071/importerror-cannot-import-name-geoip voted up and rise to the top Is there a way to install GeoIP from source code on Mac OS X? up vote 1 down vote favorite 2 I want to install the MaxMind GeoIP C library, so that I can use GeoIP as part of Django. I’m working on Mac OS X. I’ve downloaded GeoIP-1.4.8.tar.gz from here and run: ./configure make make check make install Without any http://superuser.com/questions/303460/is-there-a-way-to-install-geoip-from-source-code-on-mac-os-x problems. I’ve also downloaded GeoIP.dat.gz and GeoLiteCity.dat.gz, unzipped them and put them in a local directory. Then I’ve set the following paths in my settings.py: GEOIP_PATH = 'path_to_dat_files' GEOIP_LIBRARY_PATH = 'path_to_c_files' Now I’m trying to run python manage.py migrate (which has a reference to GeoIP in a project I'm using), but I’m still getting this error: from django.contrib.gis.utils import GeoIP ImportError: cannot import name GeoIP Any ideas? python django geoip share|improve this question edited Apr 8 '15 at 6:09 JakeGould 20.9k55978 asked Jun 28 '11 at 15:41 Richard 1902613 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted I just follow the same procedure and found nothing wrong ./configure make make check make install and put the geo unzip-ed database in django project's root dir, add the following to settings.py: GEOIP_PATH = "./" here is what I run and got: % python manage.py shell >>> from django.contrib.gis.utils import GeoIP >>> g = GeoIP() >>> g.country('google.com') {'country_name': 'United States', 'country_code': 'US'} >>>> share|improve this answer answered Jul 4 '11 at 7:18 clsung 1362 add a comment| up vote 1 down vote I realize at this point this question is about 4+ years old, but I
geodjango cannot import name geoip By : user1725454 Source: Stackoverflow.com Question! By : user1725454 Related Questions Video about Python/django : Cannot import GeoIP About Us Contact Us Legal feedback Copyright © 2015 - All Rights Reserved - www.4answered.com