Not sure if this is python's or pywin32's fault, but either way, trying to install pywin32 in python 3.6 (32 bit) leads to the following...
C:\Users\Samuel\Downloads\pywin32-220\pywin32-220>C:\Users\Samuel\AppData\Local\Programs\Python\Python36-32\python.exe setup3.py install
Converting...
Executing...
Building pywin32 3.6.220.0
Traceback (most recent call last):
File "setup3.py", line 16, in <module>
exec(str(got))
File "<string>", line 1944, in <module>
File "<string>", line 594, in init
File "C:\Users\Samuel\AppData\Local\Programs\Python\Python36-32\lib\ntpath.py", line 75, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Old Bugs - new issues at https://github.com/mhammond/pywin32/issues: #739
That error message has to do with setup.py not being able to find the windows SDK. I'm using Visual C++ Build Tools 2015 on Windows 7, running 64 bit Python 3.6. I didn't spend enough time on this to fix it, I ran into other issues with SWIG in the build later and punted.
The reason I am trying to install from source is the binary installer does not seem to work on my system. Mine errors out claiming one needs Python 3.6-32 even though I am using the 64 bit installer on 64 bit Python.
You can force the installers to find the 3.6 version with a hack. See https://sourceforge.net/p/pywin32/bugs/738/#e8e8 .
Last edit: Elias Fotinis 2017-01-02
Thank you; this appears to have worked. In addition, I also needed to add a subkey 'InstallPath' , modelled after the same subkey for Python 3.5.
All:
I have set up a repository on GitHub and am currently working on a pull request to resolve these issues. The failure to set the SDK directory is only a surface problem. There are far greater problems and they mostly stem from using distuitls, which is literally from 2000. Any contributions to resolve these issues would be welcome, as I am already pretty busy.
https://github.com/pywin32/pypiwin32/pull/2
Thank you for looking into this further. I'm not sure what help I can
offer, but I can add a little more about my situation...
My system is 64bit but I'm using 32bit Python.
I also tried the installer for Python 3.6 but that failed saying that
Python 3.6 couldn't be found in the registry.
Running the setup3.py script for Python 3.5 resulted in the same error
as given below for 3.6, although the installer for 3.5 worked fine.
Best regards,
Tim
On 02/01/2017 02:36, Xaav wrote:
Related
Old Bugs - new issues at https://github.com/mhammond/pywin32/issues: #739
Tim:
As of now it's not looking good. Here is the problem that I have run into that I found on the mailing list:
I have attempted to resolve this problem by upgrading to a newer SWIG version but have run into other problems on that front. You can see the reults of the build at https://ci.appveyor.com/project/pywin32/pypiwin32/build/1.0.10
At this point I'm probably going to investgate the problems with AxDebug, but I don't think there is a particularly encouraging chance of success. Let me know if you have any other ideas.
Last edit: Xaav 2017-01-03
I'm having this issue right now as well. I'm on Windows Server 2012 and visual Studio 2012 trying to build this for a custom-built Python 2.7. It gets pretty far but fails just like this.
I'm very unclear on where to get all of these things. I used the Windows 7 SDK download from the link in the documentation and it wouldn't install complaining about .NET 4 or something. So I got the Windows 10 SDK because it said it can be used to build stuff for Windows Server 2012.
The setup.py couldn't find my SDK (I got that Nonetype error on ntpath above but commented out some lines in setup.py to get around it).
Where should I be getting an SDK for this? because clearly the Windows 10 SDK isn't compatible.
I've made some (limited) progress, but I am now stuck here:
Mr. Hammond appears to have used an option that is not well supported and has likely been removed on the newer compiler: CLSID_PropertyChangeArray
Last edit: Xaav 2017-01-03
In case anyone is interested, I've managed to get the bulk of pywin32 building on MS Build Tools 2015 (minus Scintilla, winxp, and the python service executable) after some painful refactoring.
Last edit: Xaav 2017-01-21