简体   繁体   中英

Can't install geoplot package

I'm trying to install geoplot package for a few hours now but I can't understand why I can't do it. I saw several links in here just saying "only use conda and it will work" but neither conda install -c conda-forge geoplot or pip install geoplot are working.

The best question I saw in this matter was this one but even following the solution step by step isn't doing the job.

I'm on a Windows 10 64bit, with:

  • Python (3.7.6)
  • conda (4.8.2)
  • pip (20.0.2)
  • geos (0.2.3)
  • proj (0.2.0)
  • and shapely (1.8.0) already installed.

Also, I'm with geopandas (0.10.2) fully functional and with GDAL_DATA path already on my Windows' environment variables.

Here is the error while tryinh to install via pip :

Collecting rasterio
  Using cached rasterio-1.2.10.tar.gz (2.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\pepereira\Anaconda3\python.exe' 'C:\Users\pepereira\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\PEPERE~1\AppData\Local\Temp\tmpisdpcfsw'
       cwd: C:\Users\PEPERE~1\AppData\Local\Temp\pip-install-f8mf8fv_\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\pepereira\Anaconda3\python.exe' 'C:\Users\pepereira\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\PEPERE~1\AppData\Local\Temp\tmpisdpcfsw' Check the logs for full command output.

via conda command line it really takes a long long time and shows a bunch of dependencies conflict... Does anybody knows how can I solve this issue? Many thanks in advance!

I wan't able to solve this problem on my base environment, so in order to install geoplot I had to create a new environment on conda. Will post what I've done here below in case of anyone in the future come across this same problem:

conda create -n geoEnv python=3.8

After that I've installed directly geoplot through conda insted of (GDAL, fiona, proj, etc.) > geopandas > geoplot, because doing that I was having the same dependencie problems, even on a brand new environment, so:

conda activate geoEnv    
conda install -c conda-forge geoplot

From here I just installed jupyter using pip because I don't know why trying it with conda was also pointing out dependencie problems as well...

I don't know if it was my packages or python versions but with this solution above I was able to successfully instal geoplot .

Bonus tip: installing ipykernel and nb_conda_kernels packages on your new environment/base could help you out to manage different envs

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM