[QGIS-Developer] Pip install not working within QGIS with OSGeo4W v2?

Axel Hörteborn axel.n.c.andersson at gmail.com
Tue Jan 18 05:40:50 PST 2022


Hi,

Is there anyone else that can share some light on this issue?

I've tried to make several changes to my qgis.bat and some other bat files
but I have no proposal how to fix it. Is this an intentional or accidental
change between OSGeo4w (v1) and OSGeo4w (v2)? (Shall I rewrite my plugins
or can I hope for a fix?)

Best regards
Axel

On Sat, 15 Jan 2022 at 10:05, tijan49 at yahoo.fr <tijan49 at yahoo.fr> wrote:

> Hi Axel,
>
> I tried with the "xlxswriter" module :
>
> - in QGIS 3.16.15  => same error as you ;
> - in QGIS 3.18.3 => success
>
> Therefore it seems to be a bug in QGIS 3.16 ...
>
> Have a nice day ...
> Jean
>
>
> Le 12/01/2022 à 23:09, Axel Hörteborn a écrit :
>
> Hi dev team,
>
> I might have missed something but I can't get "pip install" to work within
> QGIS I've tried a few different options on a couple of different windows
> computers.
>
> I use matplotlib, psycopg2 and reportlab within my plugin and I have some
> simple code that installs the packages for the users:
>
> import sysimport platformimport subprocesstry:
>     import matplotlibexcept ModuleNotFoundError:
>     print('installing matplotlib')
>     if platform.system() == 'Windows':
>         subprocess.call([sys.exec_prefix + '/python', "-m", 'pip', 'install', 'matplotlib'])
>     else:
>         subprocess.call(['python3', '-m', 'pip', 'install', 'matplotlib'])
>
> But I get:
>
> WARNING: pip is configured with locations that require TLS/SSL, however
> the ssl module in Python is not available.
>
> WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None,
> status=None)) after connection broken by 'SSLError("Can't connect to HTTPS
> URL because the SSL module is not available.")': /simple/matplotlib/
>
> I can install the packages from the OSGeo4W shell (after removing the path
> to a local pip server) but it would be nice if they could be installed
> automatic for the users (which works fine with QGIS installed by OSGeo4W
> v1..).
>
> Have I missed some change or is this a bug? (can someone else confirm it?)
>
> Best regards
> Axel Hörteborn
> Maintainer of GeoDataFarm
>
> _______________________________________________
> QGIS-Developer mailing listQGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220118/4dca1e8a/attachment.html>


More information about the QGIS-Developer mailing list