[osgeo4w-dev] [osgeo4w] #649: Installing Fiona, Geopandas or rasterio using OSGeo4W breaks QGIS python
OSGeo4W
trac_osgeo4w at osgeo.org
Mon Nov 9 02:48:43 PST 2020
#649: Installing Fiona, Geopandas or rasterio using OSGeo4W breaks QGIS python
------------------------------------+----------------------------
Reporter: cratcliff | Owner: osgeo4w-dev@…
Type: defect | Status: new
Priority: critical | Component: Package
Version: | Resolution:
Keywords: fiona geopanda rasterio |
------------------------------------+----------------------------
Comment (by jef):
Quick workaround: create an empty directory .libs in
{{{%OSGEO4W_ROOT%\apps\Python37\lib\site-packages\fiona}}} and
{{{%OSGEO4W_ROOT%\apps\Python37\lib\site-packages\rasterio}}} or change
{{{%OSGEO4W_ROOT%/apps/qgis/python/qgis/utils.py}}} by adding {{{and
os.path.isdir(p)}}}:
{{{
diff --git a/python/utils.py b/python/utils.py
index c2a403efec..6be762ced9 100644
--- a/python/utils.py
+++ b/python/utils.py
@@ -780,7 +780,7 @@ def _import(name, globals={}, locals={}, fromlist=[],
level=None):
global _RemoveDllDirectory
for p in set(new_path.split(';')) -
set(old_path.split(';')):
- if p is not None and p not in _import_path:
+ if p is not None and p not in _import_path and
os.path.isdir(p):
_import_paths[p] = _AddDllDirectory(p)
for p in set(old_path.split(';')) -
set(new_path.split(';')):
}}}
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/649#comment:1>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the osgeo4w-dev
mailing list