I have installed QGIS 2.18, QGIS 3.8 and OSGeo on a Windows machine.
I tried to set up a PyCharm environment for PyQGIS coding, but I can't initialize the OGR provider to import shapefiles.
Here's the code:
qgs = QgsApplication(, False) qgs.setPrefixPath(r'C:/PROGRA~1/QGIS3~1.8/apps/qgis', True) qgs.initQgis()
When I try to run
qgs = QgsApplication.setPrefixPath(r'C:/PROGRA~1/QGIS3~1.8/apps/qgis', True) print(qgs)
None. If I have installed three versions of QGIS in Windows there are some problems with