ejwa / gitinspector

:bar_chart: The statistical analysis tool for git repositories
GNU General Public License v3.0
2.35k stars 324 forks source link

Install with setuptools on Windows fails #153

Closed polwel closed 6 years ago

polwel commented 6 years ago

I downloaded version 0.4.4, and ran setup.py install. According to setupttols, the installation was successful, but if I now try to run gitinspector from the command window, I get

C:\Users\polwel\Desktop\gitinspector-0.4.4>gitinspector
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python36-32\Scripts\gitinspector-script.py", line 11, in <module>
    load_entry_point('gitinspector==0.4.4', 'console_scripts', 'gitinspector')()
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 2291, in load
    return self.resolve()
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:\Program Files (x86)\Python36-32\lib\site-packages\gitinspector-0.4.4-py3.6.egg\gitinspector\gitinspector.py", line 24, in <module>
    import localization
ModuleNotFoundError: No module named 'localization'

C:\Users\polwel\Desktop\gitinspector-0.4.4>where gitinspector
C:\Program Files (x86)\Python36-32\Scripts\gitinspector.exe

I tried this on different machines (Python 3.5 with Anaconda on Windows 7, and regular Python 3.6 on Window 10). I suspect I am either doing something wrong, or there is a configuration issue.

polwel commented 6 years ago

Apparently something like this has happened before. See #73.

polwel commented 6 years ago

Ok, the issue no longer occurs in the master branch. The commit that fixed the issue I referenced above must not have been cherry picked for v0.4.4.

I am closing the issue.

adam-waldenberg commented 6 years ago

Hi @polwel. The discussion in #73 does not affect v0.4.4, as the refactoring done in the master branch is not part of that release. Not quite sure what is going on. In 0.4.4 there are no sub directories or a separate gitinspectory.py entry script.

It should work. Try on a unix/linux box and see if that makes a difference. Python (and much of it's tools) don't always behave well under Windows. Setuptools and the current setup.py is used for the debian package creation and works without problems.

Maybe switching to python 2.7 would fix it ... Even though gitinspector works with v3, v2 is the default in many distros - so this is still the main target.