<div dir="ltr">Phil,<br><br>"<span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">pyqtdeploy-0.0.dev0-py3.6.egg" appears because I am compiling my own version of pyqtdeploy from source with a tiny modification to add newline characters to the XML file (so that changes in the file can be properly detected by version control systems). In order to eliminate this potential unknown, I repeated everything with Python 3.6.4 and the official pyqtdeploy 2.1 (installed using <font face="monospace, monospace">`pip install pyqtdeploy==2.1`</font>). Here is the identical error:<br></span><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace, monospace">pyqtdeploy-build --build-dir /Users/morrisde/contract/PiranhaColorQt10-2/ios/sysroot/pump --target ios-64 --sysroot /Users/morrisde/contract/PiranhaColorQt10-2/ios/sysroot pump.pdy</font></div><div><font face="monospace, monospace">Traceback (most recent call last):</font></div><div><font face="monospace, monospace"> File "/usr/local/var/pyenv/versions/3.6.4/bin/pyqtdeploy-build", line 7, in <module></font></div><div><font face="monospace, monospace"> from pyqtdeploy.pyqtdeploybuild_main import main</font></div><div><font face="monospace, monospace"> File "/usr/local/var/pyenv/versions/3.6.4/lib/python3.6/site-packages/pyqtdeploy/__init__.py", line 28, in <module></font></div><div><font face="monospace, monospace"> from .builder import Builder</font></div><div><font face="monospace, monospace"> File "/usr/local/var/pyenv/versions/3.6.4/lib/python3.6/site-packages/pyqtdeploy/builder/__init__.py", line 28, in <module></font></div><div><font face="monospace, monospace"> from .builder import Builder</font></div><div><font face="monospace, monospace"> File "/usr/local/var/pyenv/versions/3.6.4/lib/python3.6/site-packages/pyqtdeploy/builder/builder.py", line 33, in <module></font></div><div><font face="monospace, monospace"> from PyQt5.QtCore import (QByteArray, QCoreApplication, QDir, QFile,</font></div><div><font face="monospace, monospace">ModuleNotFoundError: No module named 'PyQt5.QtCore'</font></div><div><font face="monospace, monospace">make: *** [pump_xcode] Error 1</font></div></blockquote><div><br>The above is for python 3.6.4, installed using pyenv but no virtualenv to test if the virtual environment was the problem.<br><br></div><div>Any ideas?<br><br>David</div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 16, 2018 at 10:05 PM, Phil Thompson <span dir="ltr"><<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 14 Jun 2018, at 4:44 pm, David Morris <<a href="mailto:othalan@othalan.net">othalan@othalan.net</a>> wrote:<br>
> <br>
> I am attempting to update a project to pyqtdeploy 2.0. I have the sysroot setup, but when attempting to build my application I get an import error for PyQt5.QtCore. PyQt5 is setup and runs my app perfectly, and pyqtdeploy itself runs perfectly. Below is the actual error. Any ideas on what I did wrong?<br>
<br>
</span>The reference to...<br>
<br>
pyqtdeploy-0.0.dev0-py3.6.egg<br>
<br>
...below doesn't look right.<br>
<br>
Phil<br>
<div><div class="h5"><br>
> <br>
> Note that I am using a pyenv virtual environment (pyenv virtualenv) if that is relevant .....<br>
> <br>
> Compile OS: MacOS High Sierra (10.13.4)<br>
> <br>
> pyqtdeploy-build --build-dir /Users/morrisde/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test/pump --target ios-64 --sysroot /Users/morrisde/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test pump.pdy<br>
> Traceback (most recent call last):<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/bin/<wbr>pyqtdeploy-build", line 11, in <module><br>
> load_entry_point('pyqtdeploy==<wbr>0.0.dev0', 'console_scripts', 'pyqtdeploy-build')()<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/pkg_<wbr>resources/__init__.py", line 480, in load_entry_point<br>
> return get_distribution(dist).load_<wbr>entry_point(group, name)<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/pkg_<wbr>resources/__init__.py", line 2693, in load_entry_point<br>
> return ep.load()<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/pkg_<wbr>resources/__init__.py", line 2324, in load<br>
> return self.resolve()<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/pkg_<wbr>resources/__init__.py", line 2330, in resolve<br>
> module = __import__(self.module_name, fromlist=['__name__'], level=0)<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/<wbr>pyqtdeploy-0.0.dev0-py3.6.egg/<wbr>pyqtdeploy/__init__.py", line 28, in <module><br>
> from .builder import Builder<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/<wbr>pyqtdeploy-0.0.dev0-py3.6.egg/<wbr>pyqtdeploy/builder/__init__.<wbr>py", line 28, in <module><br>
> from .builder import Builder<br>
> File "/usr/local/var/pyenv/<wbr>versions/piranha-qt5/lib/<wbr>python3.6/site-packages/<wbr>pyqtdeploy-0.0.dev0-py3.6.egg/<wbr>pyqtdeploy/builder/builder.py"<wbr>, line 33, in <module><br>
> from PyQt5.QtCore import (QByteArray, QCoreApplication, QDir, QFile,<br>
> ModuleNotFoundError: No module named 'PyQt5.QtCore'<br>
> make: *** [pump_xcode] Error 1<br>
> <br>
> <br>
> Examining the python environment used by the file "builder.py" referenced in the traceback, I get the following information:<br>
> <br>
> sys.executable: /usr/local/var/pyenv/versions/<wbr>3.6.5/bin/python<br>
> sys.path: ['/usr/local/var/pyenv/<wbr>versions/3.6.5/bin', '/Users/morrisde/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test/lib/python3.6/site-<wbr>packages', '/Users/morrisde/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test/lib/python3.6/site-<wbr>packages/numpy-1.14.3-py3.6-<wbr>macosx-10.13-x86_64.egg', '/usr/local/var/pyenv/<wbr>versions/3.6.5/lib/python36.<wbr>zip', '/usr/local/var/pyenv/<wbr>versions/3.6.5/lib/python3.6', '/usr/local/var/pyenv/<wbr>versions/3.6.5/lib/python3.6/<wbr>lib-dynload', '/usr/local/var/pyenv/<wbr>versions/3.6.5/lib/python3.6/<wbr>site-packages', '/usr/local/var/pyenv/<wbr>versions/3.6.5/lib/python3.6/<wbr>site-packages/pyqtdeploy-0.0.<wbr>dev0-py3.6.egg']<br>
> <br>
> This looks wrong in two ways, though perhaps I am simply either doing something wrong or misunderstanding what it should look like:<br>
> <br>
> • I am using a pyenv virtual environment (pyenv virtualenv). As such, the correct executable path should be whatever is setup by my pyenv environment:<br>
> <br>
> /usr/local/var/pyenv/shims/<wbr>python<br>
> <br>
> It appears that pyqtdeploy-build is taking the real executable and ignoring the virtual environment, which breaks pyenv functionality. (which is possibly acceptable in this situation except for the fact that I can't actually compile the iOS application).<br>
> <br>
> • The python module path (sys.path) is missing the pyenv virtual environment site packages which should be found here:<br>
> <br>
> /usr/local/var/pyenv/versions/<wbr>piranha-qt5/lib/python3.6/<wbr>site-packages<br>
> <br>
> It appears that pyqtdeploy-build is looking for PyQt5 in the sysroot directory (/Users/morrisde/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test/lib/python3.6/site-<wbr>packages), however no PyQt5 installation exists in that location.<br>
> <br>
> Can anyone help with how to setup an iOS build environment?<br>
> Is it possible to use pyenv (with or without a virtual environment)?<br>
> Or is there some other setup which must be used?<br>
> Or am I missing a build step?<br>
> <br>
> I attached my sysroot.json config file in the previous email. Here are the build commands I am using (with full python virtualenv setup):<br>
> <br>
> brew install pyenv pyenv-virtualenv<br>
> pyenv install 3.6.5<br>
> pyenv virtualenv -p python3.6 3.6.5 piranha-qt5<br>
> pyenv local piranha-qt5<br>
> pip install sip==4.19.8 pyqt5==5.10.1<br>
> <br>
> pyqtdeploy-sysroot --sysroot ${HOME}/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test \<br>
> --source-dir ${HOME}/contract/pkgsrc sysroot.json \<br>
> --target ios-64<br>
> <br>
> pyqtdeploy-build --build-dir ${HOME}/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test/pump \<br>
> --target ios-64 \<br>
> --sysroot ${HOME}/contract/<wbr>PiranhaColorQt10/ios/sysroot_<wbr>test pump.pdy<br>
> <br>
> Any help on what I am doing wrong?<br>
> <br>
> Thank you,<br>
> David<br>
> <br>
> <br>
</div></div>> <sysroot.json>________________<wbr>______________________________<wbr>_<br>
> PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
> <a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank">https://www.<wbr>riverbankcomputing.com/<wbr>mailman/listinfo/pyqt</a><br>
<br>
</blockquote></div><br></div>