[Bug 783854] New: [QGIS] repo-geo: cannot import qgis.core/gui into python without setting PYTHONPATH
https://bugzilla.novell.com/show_bug.cgi?id=783854 https://bugzilla.novell.com/show_bug.cgi?id=783854#c0 Summary: [QGIS] repo-geo: cannot import qgis.core/gui into python without setting PYTHONPATH Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: 64bit OS/Version: openSUSE 12.2 Status: NEW Severity: Minor Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: sault.don@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1 When trying to import qgis modules into python, it fails because PYTHONPATH is not set. Is this something that could be set by default? Reproducible: Always Steps to Reproduce: 1. python 2. import qgis.core Actual Results: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named qgis.core Expected Results: Python should not display an error. Empty output when importing modules usually means success. A workaround is to manually set PYTHONPATH: export PYTHONPATH=/usr/share/qgis/python -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=783854 https://bugzilla.novell.com/show_bug.cgi?id=783854#c kk zhang <kkzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@suse.com AssignedTo|bnc-team-screening@forge.pr |jmatejek@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=783854 https://bugzilla.novell.com/show_bug.cgi?id=783854#c1 Jan Matejek <jmatejek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmatejek@suse.com AssignedTo|jmatejek@suse.com |dassau@gbd-consult.de Summary|[QGIS] repo-geo: cannot |[QGIS] repo-geo: cannot |import qgis.core/gui into |import qgis.core/gui into |python without setting |python |PYTHONPATH | --- Comment #1 from Jan Matejek <jmatejek@suse.com> 2012-10-16 16:22:51 UTC --- this fails because qgis installs itself outside default python import path (when PYTHONPATH is unset, it defaults to /usr/lib(64)/pythonX.Y) and that is not supposed to work. The fix is to either modify qgis to install to the usual place, or to install a python path extension file (something.pth). Either of those must be done in qgis package. Setting default PYTHONPATH for this makes no sense - that is a good user-side workaround, but a bad system-wide configuration. Reassigning to Otto Dassau, listed as bugowner on the qgis package. A reasonable solution seems to be creating a file qgis.pth and installing it into %python_sitearch directory. This file should contain the absolute path to the modules, so, in this case, /usr/share/qgis/python. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com