<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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
      python.org: <a class="moz-txt-link-freetext" href="https://www.python.org/downloads/windows/">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 class="moz-signature" cols="72">-- 
Enlightenment is ego's ultimate disappointment.
-Chogyam Trungpa</pre>
  </body>
</html>