deeplycloudy / lmatools

Python code for working with VHF Lightning Mapping Array data
BSD 2-Clause "Simplified" License
22 stars 23 forks source link

Module conflict when running setup.py #20

Closed sjoro closed 5 years ago

sjoro commented 6 years ago

Installation of lmatool results in an error. Apparently the installation gets a conflict with the python io-module.

deeplycloudy commented 6 years ago

It looks like doing an absolute import will work around the problem

https://stackoverflow.com/questions/1224741/trying-to-import-module-with-the-same-name-as-a-built-in-module-causes-an-import

sjoro commented 6 years ago

Temporary fix that seems to work: 1) rename io under lmatools as, e.g., lmaio 2) modify setup.py by removing lmatools.io from packages 3) run python setup.py install 4) copy the renamed lmaio directory under the lmatools installation path with the name io

deeplycloudy commented 5 years ago

I've reorganized the package structure to avoid this problem. @sjoro I think this problem is now fixed on the reorgpackage branch.

tjlang commented 5 years ago

FYI, I ran into a similar issue to this when installing from source in Python 3.7. I fixed it locally by basically renaming the io directory to something else and changing all the relevant import statements. If the submodule directories were placed into a master lmatools directory (e.g., like glmtools does), would that help?

deeplycloudy commented 5 years ago

@tjlang this is what the branch mentioned in the above package was meant to do. Does installing from that branch fix the problem for you?

tjlang commented 5 years ago

OK, @deeplycloudy, that fixed the install. Should that branch be made the master branch? It would make the package less confusing to install.

deeplycloudy commented 5 years ago

Thanks for the test. With that in mind, I went ahead with PR #24, and will close this issue.