[QGIS-Developer] Pip install not working within QGIS with OSGeo4W v2?
Axel Hörteborn
axel.n.c.andersson at gmail.com
Wed Jan 12 14:09:21 PST 2022
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220112/14ffcb91/attachment.html>
More information about the QGIS-Developer
mailing list