[Qgis-user] Multiple Python 3 versions and OSGeo4W64

Alexandre Neto senhor.neto at gmail.com
Mon Aug 9 19:40:00 PDT 2021


Ho John,

If you are willing to try, you could install QGIS using conda.

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.

Check my post about it:

https://gisunchained.wordpress.com/2019/05/29/using-qgis-from-conda/

The main caveat will be grass algorithms, it will probably not work.

Best regards,

Alexandre Neto


A terça, 10/08/2021, 03:16, john polo <jpolo at mail.usf.edu> escreveu:

> 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 at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210810/4edb281f/attachment.html>


More information about the Qgis-user mailing list