<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>That blogpost is almost 10 years old, things are much easier
      nowadays :)<br>
    </p>
    <p><br>
      Selecting the correct *existing* .bat-file as interpreter is all
      you need to do. See <a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/a/428577/51035">https://gis.stackexchange.com/a/428577/51035</a></p>
    <p><br>
    </p>
    <p>If you are not on Windows, the approach would be different of
      course.<br>
    </p>
    <p><br>
    </p>
    <p>Cheers, Hannes<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 17.01.24 15:57, Maria Elena Alfano
      via QGIS-Developer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DBBPR05MB6505769E87FB44F540CA88A7F8722@DBBPR05MB6505.eurprd05.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div class="elementToProof"><span
style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">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 </span></div>
      <div
style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
        <span
style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
          <a
href="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."
            target="_blank" id="OWA92af586a-e64d-fc08-871e-02120ec603f3"
            class="OWAAutoLink" rel="noopener noreferrer"
            data-auth="NotApplicable" data-linkindex="0"
            style="margin: 0px;" data-loopstyle="linkonly"
            moz-do-not-send="true">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.</a></span></div>
      <div
style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
        <span
style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; color: rgb(36, 36, 36); font-weight: 400;"><br>
        </span></div>
      <div class="elementToProof"
style="text-align: left; background-color: rgb(255, 255, 255); margin: 0px;">
        <span
style="letter-spacing: normal; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"> 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.</span></div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Johannes Kröger / GIS-Entwickler/-Berater

---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der <a class="moz-txt-link-abbreviated" href="http://www.foss-academy.com">www.foss-academy.com</a>
---------------------------------------------

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

<a class="moz-txt-link-abbreviated" href="mailto:johannes.kroeger@wheregroup.com">johannes.kroeger@wheregroup.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a>
Geschäftsführer:
Olaf Knopp, Peter Stamm 
Amtsgericht Bonn, HRB 9885
-------------------------------
</pre>
  </body>
</html>