[PyQt] Help with getting sip built on Windows
Phil Thompson
phil at riverbankcomputing.com
Sat Feb 9 15:37:00 GMT 2019
On 9 Feb 2019, at 3:15 pm, Neil Jansen <njansen1 at gmail.com> wrote:
>
> I'm trying to get the commercial version of PyQt5 built in Windows, and I'm stuck.
>
> The tl;dr is that I'm looking for one of two things:
>
> 1) An official wheel distribution of sip that's greater than 4.19.11
>
> or,
>
> 2) A layman's guide to setting up a build environment to compile sip, that was written on or after 2017 (because Microsoft's releases and download links changed after that date).
>
> I'm trying to do this with the freely available tools that can be downloaded from Microsoft's site, I haven't budgeted for a full copy of MS VC++ / Visual Studio nor have I even looked to see what those have costed, I'm assuming that I can do it with free tools but again, I've not found a concrete guide that gives this information.
>
> And ideally, I'm looking for a guide that assumes that I have basic C/C++ skills (I can compile C++ code fine on Linux and Mac, which are quite pleasant), but cannot manage to figure out how to get the MS VC++ toolchain installed due to a mixture of ignorance of what the toolchain ecosystem consists of, and complexity / fragility of Microsoft's toolchain when being run from a commandline (Having to start in certain shells to have the environment variables just right, and the fact that it's such a moving target, with so many operating systems and SDK versions to keep track of).
>
>
> For more details of where I'm actually stuck at, read below, or just skip it as it's kind of long-winded and is only supplemental to my question.
>
> -----
>
> Here's the list of events that led up to the question(s) above:
>
> I'm able to build the commercial wheel for PyQt5, from the instructions provided. In order to install the wheels, it's needing a dependency to the sip package. OK let's go get that.
>
> First stop was Riverbank's download page but they don't release wheels directly.
>
> Next stop was pypi because I know they'll be there. Latest distributable wheel version of sip on pypi.org is 4.19.8. So I attempt to use that as a dependency when installing the 'PyQt5_commercial-5.11.3-5.12.1-cp35.cp36.cp37.cp38-none-win_amd64.whl' file. That fails, due to a dependency error. It requires sip version >= 4.19.11, < 4.20.
>
> OK so maybe I can install it from source? (on Windows, ugh)
>
> I download the source (currently at 4.19.13) from riverbank, go through the instructions, get it configured, and then try to run 'make', per the instructions on riverbank's site. I google a bit, find some mailing list threads that mention using 'nmake' because it it's Windows and they have to do everything different. I've previously attempted to install MSVC2015 for various other Python / Cython reasons. Cython works fine, but nmake fails the first time I run it. 'cl.exe' is not found. I google some more, and end up installing Microsoft 2017 build tools. I couldn't even find the 2015 build tools and it seems like Microsoft has either pulled it / deprecated it, or is making the link really hard to find (most '2015 build tools' links redirect to '2017 build tools'). So after a half-hour and a reboot, still no luck. This time, I get an even weirder error, cl.exe returned D8021, invalid numeric argument /FS. I google more, something about making sure you're running 'vcvars32.bat', but I have no such file on my system. Most of the information is pre-2015 or returns 404's because Microsoft re-organizes their page without bothering to give the common courtesy of a redirect. This is frustrating.
>
> At this point, I've basically given up and admitted defeat. I can't find a single guide of how to get the build system 100% setup in Microsoft Windows. Microsoft's support pages are so scattered and broken and unorganized and irrelevant that I have no idea what I even need to download. Searches for "python" and "Visual C++" usually bring up the opposite (trying to get python environment installed inside visual studio ). So it's not that I'm not trying, it's just really difficult to sort out the relevant from the irrelevant.
>
> So is there a guide that I missed somewhere? I've looked everywhere and can't find it, if it exists. Any help would be appreciated.
The dependency is on v4.19.11 of...
https://pypi.org/project/PyQt5-sip/
Phil
More information about the PyQt
mailing list