[Solved] Adding support to Esri’s FileGDB driver when fiona/gdal/osgeo were installed through Anaconda

Felipe D. Asks: Adding support to Esri’s FileGDB driver when fiona/gdal/osgeo were installed through Anaconda
Is there a way to tweak the fiona/gdal/osgeo packages installed through Anaconda so that they can be used to read/write GDB files using the ESRI FileGDB driver? The main thing I’m actually trying to achieve is writing to GDB a file.

I have found multiple answers online, but all of them involve re-installing OSGeo or GDAL from the python wheel files. These methods do not work for me because I installed fiona, OSGeo and GDAL using Anaconda. So none the solutions I found online (listed below) seem to work.

I have already downloaded the DLL file from ESRI, placed it in my C:...Libsite-packagesosgeo folder and added a new environment variable called GDAL_DRIVER_PATH indicating the appropriate path. However, contrary to the suggestions in the posts listed below, the __init__.py inside the osgeo folder does not have a commented line that reads os.environ['GDAL_DRIVER_PATH'] = os.path.join(os.path.dirname(__file__), 'gdalplugins'). Therefore, I am not sure where to include this line in my own file system.

Similar (unresolved) discussions can be found on the GeoPandas and on the Fiona Github pages.

Also, here is a list of related posts/questions/sites with relevant info but which ultimately did not solve my problem.
var cid=’6482133701′;var pid=’ca-pub-7324820011476696′;var slotId=’div-gpt-ad-Ten-tools_com-medrectangle-3-0′;var ffid=1;var alS=1021%1000;var container=document.getElementById(slotId);container.style.width=’100%’;var ins=document.createElement(‘ins’);ins.id=slotId+’-asloaded’;ins.className=’adsbygoogle ezasloaded’;ins.dataset.adClient=pid;ins.dataset.adChannel=cid;if(ffid==2){ins.dataset.fullWidthResponsive=’true’;}
ins.style.display=’block’;ins.style.minWidth=container.attributes.ezaw.value+’px’;ins.style.width=’100%’;ins.style.height=container.attributes.ezah.value+’px’;container.appendChild(ins);(adsbygoogle=window.adsbygoogle||[]).push({});window.ezoSTPixelAdd(slotId,’stat_source_id’,44);window.ezoSTPixelAdd(slotId,’adsensetype’,1);var lo=new MutationObserver(window.ezaslEvent);lo.observe(document.getElementById(slotId+’-asloaded’),{attributes:true});

How I installed Fiona and other packages:​

I’m currently using Windows 10. After installing Anaconda, I created a new environment called myenv and installed the main libraries I was going to use:

Code:
conda create -n myenv pandas geopandas fiona spyder numpy scipy

GDAL was automatically installed as one of the associated/required packages for fiona and geopandas.

In my command prompt, when I activate myenv and type gdalinfo --version, I get the following response:

Code:
GDAL 3.0.2, released 2019/10/28

When I use the python-based route, I get the same answer.

Code:
import osgeo.gdal
print(osgeo.gdal.__version__)
>3.0.2

Additional Notes:​

If the answer involves something like “you need to compile/build GDAL from source files”, please include a step-by-step on how to do so, including what to do after “building” (for example, where to put the files and how to get Python to use the newly-built version of GDAL within a specific conda environment). I know this is a lot to ask, and I apologize for doing so. It’s just that I have tried looking into this process and it is not very newbie-friendly.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.
 

 
if(typeof ez_ad_units!=’undefined’){ez_ad_units.push([[250,250],’Ten-tools_com-large-mobile-banner-1′,’ezslot_6′,122,’0′,’0′])};if(typeof __ez_fad_position!=’undefined’){__ez_fad_position(‘div-gpt-ad-Ten-tools_com-large-mobile-banner-1-0’)};if(typeof ez_ad_units!=’undefined’){ez_ad_units.push([[250,250],’Ten-tools_com-large-mobile-banner-1′,’ezslot_7′,122,’0′,’1′])};if(typeof __ez_fad_position!=’undefined’){__ez_fad_position(‘div-gpt-ad-Ten-tools_com-large-mobile-banner-1-0_1’)};.large-mobile-banner-1-multi-122{border:none!important;display:block!important;float:none!important;line-height:0;margin-bottom:15px!important;margin-left:auto!important;margin-right:auto!important;margin-top:15px!important;max-width:100%!important;min-height:250px;min-width:250px;padding:0;text-align:center!important}