Skip to main content

Issues when installing Cognite Python SDK in Windows


Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img

Issue:

When we install Cognite python SDK if you are observing an error warning as below,

WARNING: Discarding https://files.pythonhosted.org/packages/25/50/0466d5d83e1859c5ca38351ee932d64cc5635f9d4dad522879e58f4b0018/Fiona-1.8.2.tar.gz#sha256=4c6419b7ac29136708029f6a44b4ccd458735a4d241016c7b1bab41685c08d8f (from https://pypi.org/simple/fiona/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading Fiona-1.8.1.tar.gz (1.1 MB)
|████████████████████████████████| 1.1 MB 3.2 MB/s
ERROR: Command errored out with exit status 1:
command: 'c:\users\mithila\appdata\local\programs\python\python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\mithila\AppData\Local\Temp\pip-install-3ru45mbx\fiona_e5daa4b655dd467bb03096ab64aa19ae\setup.py'"'"'; file='"'"'C:\\Users\mithila\AppData\Local\Temp\pip-install-3ru45mbx\fiona_e5daa4b655dd467bb03096ab64aa19ae\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\mithila\AppData\Local\Temp\pip-pip-egg-info-7wzx320y'
cwd: C:\Users\mithila\AppData\Local\Temp\pip-install-3ru45mbx\fiona_e5daa4b655dd467bb03096ab64aa19ae
Complete output (1 lines):
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.
----------------------------------------

 

Possible causes:

  • The latest Windows versions are not fully supported to some python versions.

  • SDK is not optimized to the latest python versions.

Solution/Workaround:

Create a python virtual environment and install the Cognite python SDK in it.

Steps to create a python virtual environment:

  • Open a terminal and create a directory and navigate to it.
C:\Users\mithila>mkdir pythonvm

C:\Users\mithila>cd pythonvm

 

  • Install the virtualenv package

pip install virtualenv

 

  • Create the virtual environment

virtualenv mypython

 

  • Activate the virtual environmen

mypthon\Scripts\activate

 

  • Then install Cognite SDK

pip install cognite-sdk

 

0 replies

Be the first to reply!

Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings