N
N
Nikolay Baranenko2016-08-24 17:53:22
Python
Nikolay Baranenko, 2016-08-24 17:53:22

Is there pywin32 for python 3.6.0a4 [MSC v.1900 64 bit (AMD64)]?

Hello.
There was a desire to check how quickly it is possible to get a list of windows services in python.
Tried using this option.

import wmi
c = wmi.WMI ()
for s in c.Win32_Service ():
  if s.State == 'Stopped':
    print (s.Caption, s.State)

I have the following python version.
3.6.0a4 (v3.6.0a4:017cf260936b, Aug 16 2016, 00:59:16)
C:\Program Files\Python36\python.exe

Saw WMI library needed.
Connected WMI to python like this
C:\Install\WMI-1.4.9>“C:\Program Files\Python36\python.exe” setup.py install
running install
running build
running build_py
creating build
creating build\lib
copying wmi.py -> build\lib
running build_scripts
creating build\scripts-3.6
copying wmitest.py -> build\scripts-3.6
copying wmiweb.py -> build\scripts-3.6
copying wmitest.cmd -> build\scripts-3.6
copying wmitest.master.ini -> build\scripts-3.6
running install_lib
copying build\lib\wmi.py -> C:\Program Files\Python36\Lib\site-packages
byte-compiling C:\Program Files\Python36\Lib\site-packages\wmi.py to wmi.cpython
-36.pyc
running install_scripts
copying build\scripts-3.6\wmitest.cmd -> C:\Program Files\Python36\Scripts
copying build\scripts-3.6\wmitest.master.ini -> C:\Program Files\Python36\Script
s
copying build\scripts-3.6\wmitest.py -> C:\Program Files\Python36\Scripts
copying build\scripts-3.6\wmiweb.py -> C:\Program Files\Python36\Scripts
running install_data
warning: install_data: setup script did not provide a directory for ‘readme.txt’
– installing right in ‘C:\Program Files\Python36’

running install_egg_info
Writing C:\Program Files\Python36\Lib\site-packages\WMI-1.4.9-py3.6.egg-info

As far as I understood, new files successfully appeared in the script folder.
I tried to run the code again
BUT I get an error when I run it
Traceback (most recent call last):
File “CServer/repositories/projects/python_examples/first/WindowsServices.py”, line 1, in <module>
import wmi
File “C:\Program Files\Python36\lib\site-packages\wmi.py”, line 88, in <module>
from win32com.client import GetObject, Dispatch
ImportError: No module named ‘win32com’

found out that missing win32com module can make up for pywin32.
I was able to find whl packages here
www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32
tried to install
this pywin32-220.1-cp35-cp35m-win_amd64.whl
but no success, error not supported version
C:\Install\pywin32_220 >pip install pywin32-220.1-cp35-cp35m-win_amd64.whl
pywin32-220.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform

.
Tell me if there are versions of pywin32 for
3.6.0a4 (v3.6.0a4:017cf260936b, Aug 16 2016, 00:59:16)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fdrwitch, 2016-08-25
@drno-reg

Where are you in a hurry - 3.6 will be only by the new year - it's still damp ... (after alpha there will still be 4 times betta) ...
You never know what is not there (any ones are not there ??, especially for a Windows carrier) ..
Knock your head against the wall - maybe it will help !!! (kidding)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question