cloudbase / PyMI

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

pip install on Python 3.7 #40

Closed codingadvocate closed 5 years ago

codingadvocate commented 5 years ago

On issue #30 I understood we needed to wait until wheels were published, before being able to do a pip install on Python 3.7.x. I noticed the code commit in Feb to "Add Py3.7 build config", and wondered if it was related. So I've attempted the pip install a few different times since then, on Python 3.7.2 and then 3.7.3 (on Windows 10 64-bit), but still see the same ModuleNotFoundError where it's likely trying to build from source.

I am not sure if I'm just hitting something on my end now, or if the answer is the same and I just need to wait on a 3.7 wheel. Direction certainly appreciated!

Thanks!

Sample output from the pip install:

pip install pymi Collecting pymi Using cached https://files.pythonhosted.org/packages/13/09/5ec73a082c7f29a1722a18912987aa35aa611e3fc70197e6c0c331d09fa0/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\Chris\AppData\Local\Temp\pip-install-g6v4fcf5\pymi\setup.py", line 1, in import git ModuleNotFoundError: No module named 'git'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Chris\AppData\Local\Temp\pip-install-g6v4fcf5\pymi\

petrutlucian94 commented 5 years ago

PyMI currently relies on GitPython in order to detect the version. At the same time, it includes a C Python extension (mi.pyd), which has to be compiled before attempting to package or install it.

This is greatly simplified by https://github.com/cloudbase/PyMI/pull/38. As long as you have Visual Studio Build Tools installed, you'll be able to install it or package it as a wheel without having to build the VS solution yourself or edit it in order to support other Python versions.

Rather than waiting for a wheel or the above PR to be merged, I suggest cherry-picking it and generating a wheel yourself.