Bug report #13812
Couldn't load PyQGIS.
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Python plugins | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Ubuntu 14.04.3 LTS | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21837 |
Description
QGIS master fails to support Python on Ubuntu 14.04, raises this error on starting from the build dir:
Couldn't load PyQGIS. Python support will be disabled. getvalue() did not return a string Python version: 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2] QGIS version: 2.13.0-Master 'Master', 6e1df49 Python path: ['/usr/src/qgis/build/master/output/python', u'/home/strk/.qgis2/python', u'/home/strk/.qgis2/python/plugins', '/usr/src/qgis/build/master/output/python/plugins', '/usr/local/lib/python2.7/dist-packages/nik2img-0.8.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/multicorn-1.0.3_dev-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/GDAL-1.11.0-py2.7-linux-x86_64.egg', '/usr/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/cartman-0.2.3-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
Note that 2.8 branch has no problems with python (when also started from build dir)
History
#1 Updated by Giovanni Manghi almost 9 years ago
- Status changed from Open to Feedback
no problems here on the same platform.
#2 Updated by Sandro Santilli almost 9 years ago
this was with commit 6e1df491f64bff1b778502d7d53f37256afcd6f6 and the configuration script is:
DEB_BUILD_MULTIARCH=`dpkg-architecture -qDEB_BUILD_MULTIARCH` # returns x86_64-linux-gnu cmake \\ -D PYTHON_LIBRARY=/usr/lib/${DEB_BUILD_MULTIARCH}/libpython2.7.so \\ -D CMAKE_BUILD_TYPE=Debug \\ -D WITH_SERVER=ON \\ -D WITH_STAGED_PLUGINS=ON \\ -D ENABLE_TESTS=1 \\ -D CMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/g++ \\ -D WITH_ASTYLE=1 \\ -D WITH_INTERNAL_QWTPOLAR=1
The build happens in a newly created dir.
#3 Updated by Giovanni Manghi almost 9 years ago
The build happens in a newly created dir.
I can compile but I usually don't. It works ok if you install master with the nightly repo.
#4 Updated by Sandro Santilli almost 9 years ago
I'm still having this problem as of commit 8996be9ad1c8c78c8994a9c9628a17bd684abf4e
(December 2, 2015).
#5 Updated by Sandro Santilli almost 9 years ago
Sorry, on a more careful read of the error, the message is now different:
Couldn't load PyQGIS. Python support will be disabled. Traceback (most recent call last): File "", line 1, in File "/usr/src/qgis/build/master/output/python/qgis/__init__.py", line 36, in from qgis.core import QgsFeature, QgsGeometry File "/usr/src/qgis/build/master/output/python/qgis/core/__init__.py", line 9, in from qgis._core import * ImportError: No module named QtSql Python version: 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2] QGIS version: 2.13.0-Master 'Master', 8996be9 Python path: ['/usr/src/qgis/build/master/output/python', u'/home/strk/.qgis2/python', u'/home/strk/.qgis2/python/plugins', '/usr/src/qgis/build/master/output/python/plugins', '/usr/local/lib/python2.7/dist-packages/nik2img-0.8.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/multicorn-1.0.3_dev-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/GDAL-1.11.0-py2.7-linux-x86_64.egg', '/usr/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/cartman-0.2.3-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
Also happens after wiping out the ~/.qgis2 directory
Is QtSql a new dependency?
\\cc @elpaso
#6 Updated by Sandro Santilli almost 9 years ago
I find python3-pyqt4.qtsql and python3-pyqt5.qtsql packaged, but none for python 2.7, which I'm using.
Is python 2.7 still supposed to be supported by qgis-2.12 ?
#7 Updated by Sandro Santilli almost 9 years ago
Both the db_manager and the processing plugins use the QtSql package.
No plugin did that in QGIS 2.8.
#8 Updated by Luigi Pirelli almost 9 years ago
Sandro Santilli wrote:
Both the db_manager and the processing plugins use the QtSql package.
No plugin did that in QGIS 2.8.
libqt4-sql
and
python-qt4-sql
#9 Updated by Sandro Santilli almost 9 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed/implemented
Installing python-qt4-sql fixed the issue, thanks Luigi Pirelli for the hint.
The getvalue() I cannot reproduce anymore so assuming fixed.
#10 Updated by Akkal Bist over 6 years ago
*Hello this is my error in ubuntu 18.04 and i am unable to install OpenLayerPlugin
*akkal@akkal-HP:~$ qgis
Warning: libpng warning: iCCP: known incorrect sRGB profile
Warning: libpng warning: iCCP: known incorrect sRGB profile
"<font color=\"red\">Couldn't load PyQGIS.<br>Python support will be disabled.</font><br>