Can't install Fiona on Windows

后端 未结 5 1627
天涯浪人
天涯浪人 2020-12-19 13:05

I\'ve done a software on ubuntu, and I\'m having several problems to run this software on Windows.

My biggest issue point now is that I\'m trying to install \"fiona\

相关标签:
5条回答
  • 2020-12-19 13:44

    Finally after 6 hours of trying like crazy for installing Fiona. I will try to make it as simple as possible. Most of the guide are taken from here How to install GDAL

    Download the required gdal file here:

    1) https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal

    2) Then you can install the wheel file:

    python.exe -m pip install GDAL-2.2.4-cp35-cp35m-win_amd64.whl

    3) Add Environment Variable with the name GDAL_DATA and value =

    C:\Users\yourUserName\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\osgeo\data\gdal

    4) In most cases we require Visual C++ build tools. Install only the build tools and launch or download c++ visual studio from official link, Link to shortcut download from here:

    Visual C++ 2015 Build Tools

    5) Now install suitable fiona wheel from here here

    and run: pip install C:/path/to/Fiona‑1.8.4‑cp37‑cp37m‑win32.whl

    6) run pip install fiona

    0 讨论(0)
  • 2020-12-19 13:46

    You can use conda to install fiona. This is what I did:

    1. Make a virtual environment in Anaconda Navigator and install GDAL into this environement through the GUI.
    2. Install shapely with pip install shapely
    3. install finona with conda install -c conda-forge fiona

    This worked for me.

    0 讨论(0)
  • 2020-12-19 13:52

    When building from source on Windows, it is important to know that setup.py cannot rely on gdal-config, which is only present on UNIX systems. On Windows, these paths need to be provided by the user. You will need to find the include files and the library files for gdal and use setup.py

    The GDAL DLL files and gdal-data directory need to be in your Windows PATH otherwise building Fiona will fail to work.

    Follow below steps to install Fiona and geopandas on windows

    Step 1: Download the Fiona wheel from this website. please pick the .whl package that correlates with your python interpreter as well system build (i.e. 32 bit or 64 bit)

    Step 2: Install fiona by using pip install path/to/fiona.whl

    Step 3: Install geopandas by using 'pip install geopandas'

    0 讨论(0)
  • 2020-12-19 14:04

    To install Fiona on windows, you need to follow the below-mentioned steps: -

    1. You need to install GDAL wheel file using the link . After visiting this link, download this file named GDAL‑3.0.4‑cp37‑cp37m‑win32.whl since it worked for me and then use the command
    pip install c:\Users\........\GDAL‑3.0.4‑cp37‑cp37m‑win32.whl
    

    to successfully install GDAL which is the requirement of Geopandas.

    1. After installing the GDAL, you need to install a Fiona wheel file using the link. Upon visiting this link, download the file named Fiona‑1.8.13‑cp37‑cp37m‑win32.whl since it is the supported wheel file for most of the windows users. After downloading this file, use the command
    pip install c:\Users\........\Fiona‑1.8.13‑cp37‑cp37m‑win32.whl
    

    NOTE: If the above-mentioned wheel file doesn't work for you, then try using alternate wheel files.

    0 讨论(0)
  • 2020-12-19 14:05

    The best way to deal with Fiona Package is using conda. I was facing same issue on Windows while was trying to install geopandas through:

    pip3 install geopandas
    

    So, to fix installation failure due to Fiona needing additional packages needed to compile I used:

    conda install geopandas
    
    0 讨论(0)
提交回复
热议问题