Hot answers tagged

7

Check your environment_variable: setx GDAL_DATA "C:\Program Files\GDAL\gdal-data" setx GDAL_DRIVER_PATH "C:\Program Files\GDAL\gdalplugins" setx PROJ_LIB "C:\Program Files\GDAL\projlib" setx PYTHONPATH "C:\Program Files\GDAL\"


6

I set the PROJ_LIB environment variable to point to the PROJ.4 data directory (where proj.db lives) and this problem has been solved,hope that is useful to you.


5

I don't think you can. If you dig into the arcpy source you'll find that arcpy.Describe essentially returns a wrapper around a non-python binary object (see line 369 in <install dir>\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py) which doesn't have a class you can inherit from. However, you could fake a subclass, by creating a stand-alone ...


4

If you are using the ArcMap application rather than the ArcGIS Pro application of the ArcGIS Desktop product then I believe you will need to use the ArcPy that installs with ArcMap and that requires you to use Python 2.x.


3

The normal way to use conda is to activate an environment where proj is installed, which sets PROJ_LIB to the correct path. However, it's not always possible to run "activate", for instance from PyCharm or Spyder IDEs. Here is my workaround that works for a few scenarios: import os # workaround if activate is not called conda_prefix = os.environ.get('...


3

I just struggled through this. ArcGIS Pro (v2.5) doesn't seem to support all of the dependencies for fiona v1.8.6, even though that is the recommended install version. If you downgrade fiona to 1.8.4, all of the other dependent modules will subsequently downgrade. After the downgrade, everything imported fine for me.


2

Got this error too when all my GIS related packages (geopandas, gdal, fiona) that all seem to rely on that libfontconfig randomnly broke. In terminal, I had to first install the fontconfig package using brew brew install fontconfig Navigate to your python install path, which is in your error: cd /Users/tomkom/anaconda3/lib/ Rename the libfontconfig to a ...


2

If those steps are exactly what you did the problem may be that you installed the package in the wrong environment. Prior to installing qgis (step 2) you have not activated the environment which means qgis is installed in you base environment. You are then trying to add the path to a library outside of the environment which can be tricky for an application ...


2

The EE Python API has been updated, breaking backwards compatibility. This is the way you get the tile URL these days: def GetTileLayerUrl(ee_image_object): map_id = ee.Image(ee_image_object).getMapId() tile_fetcher = map_id['tile_fetcher'] return tile_fetcher.url_format


2

I used pip instead, and it worked. pip install geopandas. I did this because geopandas installs fiona. I should have tried this before posting.


1

Since you're on Windows 10, search for "Python Command Prompt". This will open a window with the current default ArcGIS Pro python environment activated. Pip and other python modules should work normally, as well as conda.


1

The environmental variable PROJ_LIB needed to be set to the location of the files used by the proj library. In my case that was in the following directory: 'C:\\Users\\frankbr\\.conda\\envs\\pyfor_env\\Library\\share' Editing the build configuration in PyCharm allows for modification of environmental variables. See this tutorial.


1

Add these commands to your code at the beginning. Your issue will be solved. import os os.environ['PROJ_LIB'] = 'C:\\Users\\Sai kiran\\anaconda3\\envs\\sai\\Library\\share\\proj' os.environ['GDAL_DATA'] = 'C:\\Users\\Sai kiran\\anaconda3\\envs\sai\\Library\\share' Search for the location of your proj.db file in your anaconda directory and replace the same ...


1

To use GDAL and/or PROJ from conda, you need to activate the environment, which sets the necessary environment variables (including GDAL_DATA and PROJ_LIB). If you have conda on your path, it's simply conda activate base (or other environment). If you don't have conda on your path, you can activate this a bit differently. For example, to activate the "base"...


1

Hopefully somebody who understands the internal processes better than me can provide an answer. You can add GDAL to your Anaconda installation, and use it this way for example: import gdal import ogr # it should also be available if gdal is present And then use these packages in your standalone script, which reproduces the internal processing of QGIS. ...


1

Only QGIS 2.18 is available for Linux via conda-forge and it requires Python 2.7. Try: conda create -c conda-forge -n qgisenv qgis You won't be able to install matplotlib though. I'm not sure where the fault is. If you restrict packages to the conda-forge channel (conda create/install -c conda-forge --override-channels etc...) then QGIS 2 conflicts ...


1

From the documentation: import arcsilib arcsilib.arcsirun.SomeArcsiTool(AnARCSIParamsObj)


1

Treat conda envs as disposable. If you have trouble installing gdal into an existing environment, ignore it and create a new env conda create -n mynew env gdal other packages etc... Never install stuff into your default ("root") environment. Don't have 2 root conda installs (miniconda2 and miniconda3), just install one and use it to create separate ...


1

I think the problem is in the Anaconda version that you are using. You should install Anaconda 2 (32 bit) not Anaconda 3 (32 bit). ArcGIS 10.4 works with python 2 which is 2.7 which is included in Anaconda 2. ArcGIS 10.4 does not work with Python 3.6 which is included in Anaconda 3 which you already use and stated in your question. I am using Anaconda 2 (...


1

I've found that the dependency versions are a bit messed up. GDAL is relying on there being older versions of certain libraries, but newer ones are installed by default. I've managed to get it working by forcing older versions of some of the dependencies. A minimal working environment.yml looks like this: name: gis_project channels: - conda-forge - ...


Only top voted, non community-wiki answers of a minimum length are eligible