cloudbase / PyMI

A blazing fast replacement for the Python WMI module
Apache License 2.0
21 stars 14 forks source link

Can't install with pip #30

Closed ayeganov closed 7 years ago

ayeganov commented 7 years ago

Setup.py relies on gitpython being installed to install PyMI:

Collecting PyMI Using cached PyMI-1.0.4.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\AYEGAN~1.SYM\AppData\Local\Temp\pip-build-nrog9ome\PyMI\setup.py", line 1, in import git ImportError: No module named 'git'

After installing "gitpython" setup.py still fails:

Collecting PyMI Using cached PyMI-1.0.4.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\AYEGAN~1.SYM\AppData\Local\Temp\pip-build-q9p3q46t\PyMI\setup.py", line 17, in version=get_git_version(), File "C:\Users\AYEGAN~1.SYM\AppData\Local\Temp\pip-build-q9p3q46t\PyMI\setup.py", line 8, in get_git_version return g.describe(tags=True) File "c:\program files\python35\lib\site-packages\git\cmd.py", line 424, in return lambda *args, *kwargs: self._call_process(name, args, kwargs) File "c:\program files\python35\lib\site-packages\git\cmd.py", line 873, in _call_process return self.execute(call, _kwargs) File "c:\program files\python35\lib\site-packages\git\cmd.py", line 687, in execute raise GitCommandError(command, status, stderr_value, stdout_value) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git describe --tags stderr: 'fatal: Not a git repository (or any of the parent directories): .git'

americanhanko commented 7 years ago

Same here.

alexpilotti commented 7 years ago

In this case pip is trying to build from sources instead of using a binary wheel. beside going to fix this, we're also going to release wheels for Python 3.5 and 3.6.

alexpilotti commented 7 years ago

@ayeganov @americanhanko Added a wheel for Python 3.5 x64, can you please test if pip install works for you now?

ayeganov commented 7 years ago

All good now! Thank you for the fix.

revizor1 commented 7 years ago

Any fix for 3.6 x64 yet?

alexpilotti commented 7 years ago

@revizor1 just added wheels for 3.6 (both amd64 and win32), please let us know if you have any issues.

revizor1 commented 7 years ago

Thank you so much!

alexpilotti commented 7 years ago

@revizor1 thanks for getting back, closing this issue.

blakerouse commented 7 years ago

Can you add a wheel for 2.7 (if possible) and 3.3?

As cloudbase-init uses py27 and py33 in its tox.ini. This branch for cloudbase-init for MAAS custom networking https://github.com/ader1990/cloudbase-init/blob/advanced_networking/requirements.txt#L16 adds it as a requirement, which fails using tox because "import git" fails like above.

alexpilotti commented 7 years ago

@blakerouse there are Windows 2.7 wheels (both x86 and x64), and also 3.4, 3.5, 3.6: https://pypi.python.org/pypi/PyMI/1.0.4

Unit tests (Linux) still use 3.3 (see https://review.openstsck.org).

codingadvocate commented 5 years ago

I've hit the same issue on Windows for Python 3.7.1. No problems on 3.6.1 or 3.6.5 using the same pyMi v1.0.4, but I'm hitting the issue in testing for migration to 3.7. Nothing critical at this point, more a forward looking question.

And thank you for the great work!

alexpilotti commented 5 years ago

Hi, the reason is that we need to publish wheels for python 3.7

macabees commented 5 years ago

Same problem, PyMI is not working with Python 3.7.x

anshulxyz commented 4 years ago

getting this error for Python3.8 on Windows

ader1990 commented 4 years ago

@anshulxyz You should be able to use github actions to build PyMI with no problems. https://github.com/cloudbase/PyMI/pull/44/files

satymaju commented 4 years ago

hi, getting the same error with python 3.8 and wheel 0.34.2. Any solution guys ?

ader1990 commented 4 years ago

hi, getting the same error with python 3.8 and wheel 0.34.2. Any solution guys ?

Hello. You have the solution in my previous comment. The latest pypi version has not been updated since a while (2016).

satymaju commented 4 years ago

@ader1990 It is not clear, what you want me to do. Can you please elaborate. I tried to install it with pip install PyMI.

ader1990 commented 4 years ago

@ader1990 It is not clear, what you want me to do. Can you please elaborate. I tried to install it with pip install PyMI.

The PyMI code on pypi is obsolete and does not work with pip install. The code from this repository is the latest one, which works with pip install. You can either build PyMI using my instructions above or you can directly run: pip install git+https://github.com/cloudbase/PyMI