3

I am unsuccessful in running a QGIS python script (generated and working in QGIS and then saved as a python script). At the moment I am not fussed about the functions it is calling as can't even get to a standard print statement. The bigger picture is to migrate from running all my code using ESRI functionality to QGIS

I'm not getting past this stage:

from qgis.core import *
print("from qgis.core import *")

The error is:

*Traceback (most recent call last):
  File "X:\10_Misc\Basic_Test.py", line 9, in <module>
    from qgis.core import *
ImportError: No module named qgis.core*

Any ideas? I have made changes to my python libraries as advised here: https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html#using-pyqgis-in-standalone-scripts

Thanks in advance

DConnaghan
  • 31
  • 1
  • Sorry, I'm a bit late - this might be helpful to determine if you are working with the correct interpreter. https://stackoverflow.com/questions/2589711/find-full-path-of-the-python-interpreter. ESRI will likely set your default interpreter, so it won't pick up the QGIS interpreter. – adm-gis Oct 18 '22 at 13:27

0 Answers0