[PyQt] PyQtDeploy Sysroot issues
Phil Thompson
phil at riverbankcomputing.com
Mon Apr 9 08:08:39 BST 2018
On 9 Apr 2018, at 12:36 am, Kevin Kelly <kevin.kelly at sydaptic.com> wrote:
>
> I decided to try out PyQtDeploy v2.1 this weekend and I have spent most of the weekend stuck trying to get past buiding the sysroot. Below I am going to give you the error I have come across but ultimately I was hoping someone out there may have some tips or help on what is needed for the initial setup to get these builds done right.
>
> I have read the PyQtDeploy documentation several times through. All I have tried to do is build the Demo program, so nothing new or over the top. Because I had no interest in it, I did modify the sysroot.json file to have only the qt5, python, sip and pyqt5 options in there. I have attached that file. I have Visual Studio 2015 and 2017 installed. I downloaded the PyQt source, Python source, SIP source and opted to use the Qt installation that was in place. After I run the build-demo.py I get this error:
>
> Installing an existing Qt5
> Installing an existing Python v3.6.4 as the host Python
> Building the target Python from source
> Configuring Python v3.6.4 for win-32
> Installing C:\deploy\demo\sysroot-win-32\build\Python-3.6.4\Modules\config.c
> Installing C:\deploy\demo\sysroot-win-32\build\Python-3.6.4\pyconfig.h
> Installing C:\deploy\demo\sysroot-win-32\build\Python-3.6.4\python.pro
> Project ERROR: Cannot run compiler 'cl'. Output:
> ===================
> ===================
> Maybe you forgot to setup the environment?
> Traceback (most recent call last):
> File "c:\python36-32\lib\runpy.py", line 193, in _run_module_as_main
> "__main__", mod_spec)
> File "c:\python36-32\lib\runpy.py", line 85, in _run_code
> exec(code, run_globals)
> File "C:\Python36-32\Scripts\pyqtdeploy-sysroot.exe\__main__.py", line 9, in <module>
> File "c:\python36-32\lib\site-packages\pyqtdeploy\pyqtdeploysysroot_main.py", line 83, in main
> sysroot.build_components(args.component, args.no_clean)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\sysroot.py", line 103, in build_components
> component.build(self)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\plugins\python\python.py", line 99, in build
> self._build_target_from_source(sysroot, archive)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\plugins\python\python.py", line 201, in _build_target_from_source
> sysroot.run(sysroot.host_qmake, 'SYSROOT=' + sysroot.sysroot_dir)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\sysroot.py", line 562, in run
> subprocess.check_call(args)
> File "c:\python36-32\lib\subprocess.py", line 291, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '('C:\\Qt\\5.10.1\\msvc2015\\bin\\qmake.exe', 'SYSROOT=C:\\deploy\\demo\\sysroot-win-32')' returned non-zero exit status 3.
>
>
> I researched and the best I could come up with is that I don't have a compiler installed but like I mentioned I have VS 2015 and 2017 and VC directories in both with the nmake and other files for the compiler as best I can tell.
>
> My feeling is that I am missing something with how I setup my environment before I get started to make this work. Any help would be appreciated.
It sounds like you are not using a command shell provided by MSVC. This sets up all the environment variables needed for the compiler etc.
Phil
More information about the PyQt
mailing list