Get Fiona running on your pc easy and quick
I wanted to install Kepler.gl for a project, but kept having trouble installing fiona(which is a dependency of keplergl) and figured there probably are more people who have gone through the same. Let me show you how to fix it and install fiona.
To install fiona, we have to know its dependencies/requirements mentioned in their documentation:
Python versions 2.7 or 3.4+.
GDAL with compiled libraries and headers
Fiona depends on the modules
ordereddict. Pip will fetch these requirements for you, but users installing Fiona from a Windows installer must get them separately.
1. Python Architecture
Learn which architecture of python is installed in your pc.
>>> import platform as p
It can either be 64bit or 32bit.
2. Downloading the required files
Go to GDAL official site from here and choose a link in Downloads whose architecture matches your python
After clicking the link in Downloads, you would be sent in to a different page that matches the configuration you chose earlier.
- Compiled binaries in a single .zip package
- Compiled libraries and headers
- Generic installer for the GDAL core components
- Installer for the GDAL python bindings ( the python version and architecture should match to what you have)
Install GDAL core and then GDAL python binding from msi installers.
4. Adding environment variables
- Find where GDAL is installed:
it’s probably in
C:\Program Files (x86)\GDAL\or
- Add the following to your environment variables:
PATH: C:\Program Files (x86)\GDAL
GDAL_DATA: C:\Program Files (x86)\GDAL\gdal-data
GDAL_DRIVER_PATH: C:\Program Files (x86)\GDAL\gdalplugins
After this, execute the code blow in your terminal and paste the version in a new environment variable called
5. Installing Fiona
We are done with installing GDAL, and can now proceed to install Fiona.
Download fiona Windows binaries according to your python specification from here.
Open your command prompt and
cd to the folder where whl package of fiona you just downloaded.
Use pip to install the whl file: pip install fiona_file.whl
pip install Fiona-1.8.13-cp37-cp37m-win_amd64.whl
6. Installing keplergl (Optional)
You have all the dependencies you need, without fiona causing any error.
pip install keplergl