[QGIS-Developer] Setting up PyCharm for PyQGIS and Qt

Maria Elena Alfano mariaelena.alfano at polito.it
Wed Jan 17 07:59:28 PST 2024


Thank you very much!
But when I select the above *existing.bat file, pycharm tells me "An invalid Python interpreter name 'qgis_process-qgis.bat'!".
Do you have any ideas?


________________________________
From: Johannes Kröger (WhereGroup) <johannes.kroeger at wheregroup.com>
Sent: Wednesday, January 17, 2024 4:02 PM
To: Maria Elena Alfano <mariaelena.alfano at polito.it>; qgis-developer at lists.osgeo.org <qgis-developer at lists.osgeo.org>
Subject: Re: [QGIS-Developer] Setting up PyCharm for PyQGIS and Qt


That blogpost is almost 10 years old, things are much easier nowadays :)

Selecting the correct *existing* .bat-file as interpreter is all you need to do. See https://gis.stackexchange.com/a/428577/51035


If you are not on Windows, the approach would be different of course.


Cheers, Hannes



On 17.01.24 15:57, Maria Elena Alfano via QGIS-Developer wrote:
Good morning everyone :) I wanted to ask if anyone knows how to run Python files, which run in QGIS, directly from PyCharm. I tried using this tutorial

https://plugins.qgis.org/planet/tag/pycharm/#:~:text=Setting%20up%20PyCharm%20for%20PyQGIS%20and%20Qt&text=The%20first%20thing%20we%20need,to%20tell%20PyCharm%20about%20it.

 making the necessary modifications specific to my files, and using the Python interpreter from QGIS. However, when I try to use the command 'from qgis.core import QgsRasterLayer, QgsProject,' it tells me that I don't have the qgis.core module.



_______________________________________________
QGIS-Developer mailing list
QGIS-Developer at lists.osgeo.org<mailto:QGIS-Developer at lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


--
Johannes Kröger / GIS-Entwickler/-Berater

---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com<http://www.foss-academy.com>
---------------------------------------------

WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany

Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11

johannes.kroeger at wheregroup.com<mailto:johannes.kroeger at wheregroup.com>
www.wheregroup.com<http://www.wheregroup.com>
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
-------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240117/28e97035/attachment.htm>


More information about the QGIS-Developer mailing list