SteinRobert / python-restcountries

Python wrapper for http://restcountries.com
The Unlicense
79 stars 32 forks source link

import issue #4

Closed ncgoodbody closed 7 years ago

ncgoodbody commented 7 years ago

I've installed the package following the instructions, but when I try to import:

from restcountries import RestCountryApi as rapi

I get an import error:

ImportError: cannot import name 'RestCountryApi'
SteinRobert commented 7 years ago

Just upgrade your installation via pip:

pip install --upgrade python-restcountries

It should update to the latest version which now contains a fix.

ncgoodbody commented 7 years ago

Thanks! When I try that, it throws the following error:

Collecting python-restcountries
  Using cached python-restcountries-0.1b1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7h/dtw1h52n6rqf_w2859p05l4w0000gn/T/pip-build-eztf1m9c/python-restcountries/setup.py", line 5, in <module>
        from restcountries import __version__
      File "/private/var/folders/7h/dtw1h52n6rqf_w2859p05l4w0000gn/T/pip-build-eztf1m9c/python-restcountries/restcountries/__init__.py", line 3, in <module>
        from base import RestCountryApi
    ModuleNotFoundError: No module named 'base'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7h/dtw1h52n6rqf_w2859p05l4w0000gn/T/pip-build-eztf1m9c/python-restcountries/
SteinRobert commented 7 years ago

I made another release for this issue. Please try upgrading again. If it still doesn't work I'd really appreciate any more information you could provide (e.g. OS, Python version etc.).

ncgoodbody commented 7 years ago

Everything works great now. Thank you for taking care of it! Can't wait to dive into my dataset using this as a tool!