hobuinc / mgrs

Python MGRS library
https://pypi.python.org/pypi/mgrs
MIT License
111 stars 36 forks source link

ImportError: cannot import name Library #9

Closed reggieriser closed 8 years ago

reggieriser commented 9 years ago

When trying to pip install mgrs in 64-bit Windows, I get "ImportError: cannot import name Library" on line 8 of setup.py. Based on the info at the link below, it looks like that import hasn't been valid in setuptools for a while and needs to be adjusted:

http://stackoverflow.com/questions/24612021/python-setuptools-importerror-cannot-import-name-library

nhatbui commented 8 years ago

I'm working on updating this package. I'm sure you discovered a workaround but I'm going to post it here for anyone who happens to stumble upon this.

In setup.py, change:

if os.name == 'nt':
    from setuptools import Library as Extension
else:
    from setuptools import Extension

to

from setuptools import Extension

Reinstall using python setup.py install

hobu commented 8 years ago

Please make a pull request and I'll be happy to merge.

nhatbui commented 8 years ago

Hey Howard,

I just came back from vacation not too long ago. I got my fix. Tonight, I'll make sure it works for Python 3 and it doesn't break the *nix side of things (it shouldn't. All changes were done inside of the "if os.name == 'nt'").

nhatbui commented 8 years ago

This should be resolved in #11