when running pip install mapbox-tilesets I get the following error on my windows 10 computer during the Collecting rasterio process specifically the requirement to build wheel where I get the error. Details below.
Collecting rasterio
Using cached rasterio-1.1.8.tar.gz (2.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Sandy Haaf\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2032.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\Sandy Haaf\AppData\Local\Temp\tmp5nhr9kl_'
cwd: C:\Users\Sandy Haaf\AppData\Local\Temp\pip-install-gj86e2z4\rasterio
Complete output (2 lines):
INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available in the README.
ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Sandy Haaf\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2032.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\Sandy Haaf\AppData\Local\Temp\tmp5nhr9kl_' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'C:\Users\Sandy Haaf\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.
I cannot locate a gdal-config file, so am unable to provide the path to a GDAL-CONFIG environment variable.
C:\>gdalinfo --version
GDAL 3.1.4, released 2020/10/20
C:\>python --version
Python 3.8.7
I have reinstalled gdal using http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe
I've also added c:\OSGeo4W64\bin to both the Path and GDAL_DATA environment variables. I tried adding it to GDAL_CONFIG too but it didn't help.
Any help would be appreciated. Thanks!!
Don't know if this will help here, but I used conda to install rasterio first:
conda install -c conda-forge rasterio
Then pip install mapbox-tilesets
worked fine. In general, conda seems to work better for installing spatial packages (eg geopandas) for exactly this reason.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.