<div dir="auto">Ho John,<div dir="auto"><br></div><div dir="auto">If you are willing to try, you could install QGIS using conda.</div><div dir="auto"><br></div><div dir="auto">When you create the environment, you can specify what python version to use, then just install QGIS on that environment and it will work just fine with python 3.9.</div><div dir="auto"><br></div><div dir="auto">Check my post about it:</div><div dir="auto"><br></div><div dir="auto"><a href="https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/">https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/</a><br></div><div dir="auto"><br></div><div dir="auto">The main caveat will be grass algorithms, it will probably not work. </div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto"><br></div><div dir="auto">Alexandre Neto</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">A terça, 10/08/2021, 03:16, john polo <<a href="mailto:jpolo@mail.usf.edu" target="_blank" rel="noreferrer">jpolo@mail.usf.edu</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div>
    <p>Hi,</p>
    <p>I have QGIS 3.18 installed on Windows 10. It includes Python
      3.7.2. I need to use a newer version of Python for programming
      projects. I tried to work with 3.7.2, but packages like numpy use
      old versions that don't work with newer versions of Python. I
      tried installing Python 3.9.5. I used the version available from
      <a href="http://python.org" rel="noreferrer noreferrer" target="_blank">python.org</a>: <a href="https://www.python.org/downloads/windows/" rel="noreferrer noreferrer" target="_blank">https://www.python.org/downloads/windows/</a></p>
    <p>I changed some environment variables, specifically anything in
      PATH that would call 3.7.2 when I call Python3 on a cmd prompt.
      After that, I still get this message:</p>
    <blockquote>
      <p>Error processing line 1 of
C:\OSGeo4W64\apps\Python37\lib\site-packages\matplotlib-3.1.3-py3.7-nspkg.pth:</p>
      Traceback (most recent call last):<br>
          File "C:\OSGeo4W64\apps\Python37\lib\site.py", line 168, in
      addpackage<br>
            exec(line)<br>
          File "<string>", line 1, in <module><br>
          File "C:\OSGeo4W64\apps\Python37\lib\importlib\__init__.py",
      line 51, in <module><br>
            _w_long = _bootstrap_external._w_long<br>
        AttributeError: module 'importlib._bootstrap_external' has no
      attribute '_w_long'</blockquote>
    <p>whether I use "pipenv" or "py -3.9" ("python launcher") in any
      directory or for different users on the computer. If I call
      "python3" on the command line, a Bing window opens on the
      Microsoft Store with Python 3.9 ready to download. To be clear, I
      haven't gotten as far as calling "import matplotlib".<br>
    </p>
    <p>Since the error references OSGeo4W64, and QGIS is my primary
      software I have installed from that source (I also have GRASS, but
      don't really use it), I was wondering if someone here can point to
      an environment variable that isn't obvious that I should change to
      call 3.9.5 without any issues?<br>
    </p>
    <p>Cheers,</p>
    <p>John<br>
    </p>
    <pre cols="72">-- 
Enlightenment is ego's ultimate disappointment.
-Chogyam Trungpa</pre>
  </div>

_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>