Module 'ogr' has no attribute 'Open'
mkmitchell opened this issue · 0 comments
It seems like every year or two I have to run code I wrote in 2016 and I come back here for some help getting it going again. Thank you for the continued help.
Here is what I've tried so far. I couldn't create the environment within windows conda so I'm using the windows subsystem for linux (ubuntu 20.04). I installed conda and cloned the ocgis repo then ran
conda env create -f environment.yml
After activating I tried to run https://github.com/mkmitchell/WSI_Processing/blob/master/OCGIS_summarize_by_polygon.py
but it failed because ogr wasn't found. I installed ogr with
pip3 install --user ogr
then ran it again and got
Traceback (most recent call last):
File "OCGIS_summarize_by_polygon.py", line 32, in doCalc
ops.execute()
********
ds = ogr.Open(shp_path)
AttributeError: module 'ogr' has no attribute 'Open'
I removed a lot of the error above to the important stuff. If I import ogr I can run ogr.Open and it works fine.
Think you can help me out?
Thanks