[QGIS-Developer] Issues building from source on Mac - No module named PyQt5
Timur Girgin
girgin.timur at gmail.com
Thu Mar 8 07:10:55 PST 2018
Hello everyone,
I am having trouble building the QGIS release-3_0 branch on my Mac. I
finally got it to cmake, however I am getting an error during the make
process in which it seems that spatialite is using the system's Python(@2)
executable to find PyQT5 when in reality it should be looking for it in the
Python at 3 executable that has been given during CMAKE. I am guessing this is
what is causing the issue.
Please find the error at the bottom of this email. If anyone knows what I
am doing wrong, would you please let me know?
Thank you very much!
Tim
Here is my CMAKE:
cmake -D CMAKE_INSTALL_PREFIX=~/Downloads/QGIS-build \
-D CMAKE_BUILD_TYPE=MINSIZEREL -D ENABLE_TESTS=FALSE \
-D
SPATIALINDEX_LIBRARY=/usr/local/Cellar/spatialindex/1.8.5/lib/libspatialindex.4.dylib
\
-D
SPATIALINDEX_INCLUDE_DIR=/usr/local/Cellar/spatialindex/1.8.5/include/spatialindex/\
-D QWT_LIBRARY=/usr/local/qwt-6.1.3/lib/libqwt.dylib \
-D QWT_INCLUDE_DIR=/usr/local/qwt-6.1.3/include \
-D BISON_EXECUTABLE=/usr/local/Cellar/bison/3.0.4_1/bin/bison \
-D GEOS_LIBRARY=/usr/local/Cellar/geos/3.6.2/lib/libgeos.dylib \
-D GEOS_INCLUDE_DIR=/usr/local/Cellar/geos/3.6.2/include \
-D LIBZIP_LIBRARY=/usr/local/Cellar/libzip/1.4.0/lib/libzip.5.0.dylib \
-D LIBZIP_INCLUDE_DIR=/usr/local/Cellar/libzip/1.4.0/include \
-D LIBZIP_CONF_INCLUDE_DIR=/usr/local/Cellar/libzip/1.4.0/include \
-D EXPAT_LIBRARY=/usr/local/Cellar/expat/2.2.5/lib/libexpat.1.6.7.dylib \
-D EXPAT_INCLUDE_DIR=/usr/local/Cellar/expat/2.2.5/include \
-D Qt5Core_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Core \
-D Qt5Gui_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Gui \
-D Qt5Test_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Test \
-D Qt5Widgets_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Widgets \
-D Qt5Concurrent_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Concurrent \
-D Qt5OpenGL_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5OpenGL \
-D Qt5Xml_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Xml \
-D Qt5Svg_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Svg \
-D Qt5Network_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Network \
-D
Qt5PrintSupport_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5PrintSupport \
-D
Qt5Positioning_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Positioning \
-D
Qt5XmlPatterns_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5XmlPatterns \
-D Qt5WebKit_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5WebView \
-D Qt5UiTools_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5UiTools \
-D Qt5Sql_DIR=/usr/local/Cellar/qt/5.10.1/lib/cmake/Qt5Sql \
-D
QCA_INCLUDE_DIR=/usr/local/Cellar/qt/5.10.1/lib/qca-qt5.framework/Versions/2.1.3/Headers
\
-D
QCA_LIBRARY=/usr/local/Cellar/qt/5.10.1/lib/qca-qt5.framework/Versions/2.1.3/qca-qt5
\
-D LIBTASN1_LIBRARY=/usr/local/Cellar/libtasn1/4.13/lib/libtasn1.6.dylib \
-D LIBTASN1_INCLUDE_DIR=/usr/local/Cellar/libtasn1/4.13/include \
-D QSCINTILLA_INCLUDE_DIR=/usr/local/Cellar/qscintilla2/2.10.2_1/include \
-D
QSCINTILLA_LIBRARY=/usr/local/Cellar/qscintilla2/2.10.2_1/lib/libqscintilla2_qt5.13.1.0.dylib
\
-D QTKEYCHAIN_INCLUDE_DIR=/usr/local/Cellar/qtkeychain/0.8.0/include \
-D
QTKEYCHAIN_LIBRARY=/usr/local/Cellar/qtkeychain/0.8.0/lib/libqt5keychain.0.8.0.dylib
\
-D
SPATIALITE_LIBRARY=/usr/local/Cellar/libspatialite/4.3.0a_6/lib/mod_spatialite.7.dylib
\
-D
SPATIALITE_INCLUDE_DIR=/usr/local/Cellar/libspatialite/4.3.0a_6/include \
-D SQLITE3_LIBRARY=/usr/local/Cellar/sqlite/3.22.0/lib/libsqlite3.0.dylib
\
-D PYTHON_EXECUTABLE=/usr/local/bin/python3 \
-D
PYTHON_INCLUDE_PATH=/usr/local/Frameworks/Python.framework/Versions/3.6/Headers
\
-D
PYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.6/Python \
-D WITH_QTWEBKIT=FALSE \
..
Which outputs:
-- QGIS version: 3.0.0 Girona (30000)
-- Could not find GRASS 7
-- Found Proj: /Library/Frameworks/PROJ.framework
-- Found GEOS: /usr/local/Cellar/geos/3.6.2/lib/libgeos.dylib (3.6.2)
-- Found GDAL: /usr/local/Cellar/gdal2/2.2.3/lib/libgdal.dylib (2.2.3)
-- Found Expat: /usr/local/Cellar/expat/2.2.5/lib/libexpat.1.6.7.dylib
-- Found Spatialindex:
/usr/local/Cellar/spatialindex/1.8.5/lib/libspatialindex.4.dylib
-- Found Qwt: /usr/local/qwt-6.1.3/lib/libqwt.dylib (6.1.3)
-- Found libzip: /usr/local/Cellar/libzip/1.4.0/lib/libzip.5.0.dylib
-- Found Sqlite3: /usr/local/Cellar/sqlite/3.22.0/lib/libsqlite3.0.dylib
-- Found PostgreSQL: /usr/local/lib/libpq.dylib
-- Found SpatiaLite:
/usr/local/Cellar/libspatialite/4.3.0a_6/lib/mod_spatialite.7.dylib
-- Qt WebKit support DISABLED.
-- Found Qt version: 5.10.1
-- Found QScintilla2:
/usr/local/Cellar/qscintilla2/2.10.2_1/lib/libqscintilla2_qt5.13.1.0.dylib
(2.10.2)
-- Found QtKeychain:
/usr/local/Cellar/qtkeychain/0.8.0/lib/libqt5keychain.0.8.0.dylib
-- Found QCA:
/usr/local/Cellar/qt/5.10.1/lib/qca-qt5.framework/Versions/2.1.3/qca-qt5
(2.1.3)
-- QtCore/QCA include/lib variables missing or CMake is cross-compiling,
-- skipping QCA OpenSSL plugin C++ check
-- Pedantic compiler settings enabled
-- Found Python executable: /usr/local/bin/python3
-- Found Python version: 3.6.4
-- Found Python library:
/usr/local/Frameworks/Python.framework/Versions/3.6/Python
-- Found Python site-packages: /usr/local/lib/python3.6/site-packages
pyqt_version:050a01
pyqt_version_num:330241
pyqt_version_str:5.10.1
pyqt_version_tag:
pyqt_mod_dir:/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5
pyqt_sip_dir:/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/share/sip
pyqt_sip_flags:-t WS_MACX -t Qt_5_10_1
pyqt_bin_dir:/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/bin
-- Found PyQt5 version: 5.10.1
-- Found SIP version: 4.19.8
-- Found QScintilla2 PyQt module: 2.10.2
-- txt2tags not found - disabled
-- Found GSL: -L/usr/local/Cellar/gsl/2.4/lib -lgsl -lgslcblas
-- Qsci sip file not found - disabling bindings for derived classes
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/tgirgin/Downloads/QGIS/build
I added a MESSAGE to output the version and more of PyQt5, and it seems to
be exactly where I expect it to be. However, during make it is being looked
for using Python2.
Output of make -j8:
[ 9%] Built target zzz-MetaSearch-47-depend
[ 9%] Built target zzz-MetaSearch-46-depend
[ 9%] Built target zzz-MetaSearch-45-depend
[ 9%] Generating resources_rc.py
[ 9%] Built target zzz-db_manager-13-depend
[ 9%] Built target pyutils
[ 9%] Built target zzz-db_manager-12-depend
[ 9%] Generating resources_rc.py
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
No module named PyQt5
make[2]: *** [python/plugins/db_manager/resources_rc.py] Error 1
make[1]: ***
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-14-depend.dir/all]
Error 2
make[1]: *** Waiting for unfinished jobs....
[ 9%] Built target zzz-db_manager-2-depend
[ 9%] Built target zzz-db_manager-6-depend
[ 9%] Built target zzz-db_manager-4-depend
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
No module named PyQt5
make[2]: *** [python/plugins/db_manager/db_plugins/postgis/resources_rc.py]
Error 1
make[1]: ***
[python/plugins/db_manager/db_plugins/postgis/CMakeFiles/zzz-db_manager-1-depend.dir/all]
Error 2
make: *** [all] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180308/f7715cf4/attachment.html>
More information about the QGIS-Developer
mailing list