Hi,

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: https://www.python.org/downloads/windows/

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:

   Error processing line 1 of
   
C:\OSGeo4W64\apps\Python37\lib\site-packages\matplotlib-3.1.3-py3.7-nspkg.pth:

   Traceback (most recent call last):
        File "C:\OSGeo4W64\apps\Python37\lib\site.py", line 168, in
   addpackage
          exec(line)
        File "<string>", line 1, in <module>
        File "C:\OSGeo4W64\apps\Python37\lib\importlib\__init__.py",
   line 51, in <module>
          _w_long = _bootstrap_external._w_long
      AttributeError: module 'importlib._bootstrap_external' has no
   attribute '_w_long'

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".

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?

Cheers,

John

--
Enlightenment is ego's ultimate disappointment.
-Chogyam Trungpa

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to