Skip to main content

hello,

Despite reading all post about my problem i could not succed in solving my problem.

error message is : “Python Exception <ModuleNotFoundError>: No module named 'qgis'”

 

I can see in the transaction log that the (custom) python library 3.12 is successfully loaded. If you haven’t found this article, it mentions installing the full version? Running PyQGIS in FME PythonCaller transformer? | Community or pointing the python interpreter to the QGIS install under   Windows\\SysWOW64  or  C:\\OSGeo4W64\\apps\\Python%\\lib')


hello,

Despite reading all post about my problem i could not succed in solving my problem.

error message is : “Python Exception <ModuleNotFoundError>: No module named 'qgis'”

 

Hello olivierl

I encountered the same issue when using PyQGIS inside FME. I found that defining PYTHONHOME and PYTHONPATH in Windows (if you're a Windows user, go to System Properties > Environment Variables) can help address this problem. You can create these two new variables to specifically run Python inside PyQGIS:

  • PYTHONHOME: C:\Program Files\<Your QGIS version>\apps\Python312
  • PYTHONPATH: C:\Program Files\<Your QGIS version>\apps\qgis\python

Keep in mind that if you're using Python in other environments and need to access other libraries, you’ll need to remove or adjust these environment variables to use the default Python interpreter.

Best,
Ahmad


Reply