Installation
Contents
Installation#
.. sidebar:: Installation
Everything you need to know to start using SpaceSense’s library.
NOTE
We highly recommend to use a virtual environment such as venv or conda.
Pre-requisites#
Python 3.7 should already be installed on your system.
Installing with Venv#
On Linux/macOS#
Create a virtual environment
python3.7 -m venv venv
Activate the virtual environment
source venv/bin/activate
Upgrade pip & setuptools
python -m pip install --upgrade pip
pip install -U setuptools
Install the latest version of the client library
pip install -U spacesense
On Windows#
Create a virtual environment
If you installed Python 3.7 from Microsoft store then you should be able to run the following command:
python3.7 -m venv venv
If you downloaded python 3.7 from python.org then you should run this command instead:
python -3.7 -m venv venv
Activate the virtual environment
venv\Scripts\activate
Upgrade pip & setuptools
python -m pip install --upgrade pip
pip install -U setuptools
Install the latest version of the client library
pip install -U spacesense
And you are now ready to go.
NOTE: if you get this error when installing the library with pip please refer to the fix gdal dependencies section.
(venv) PS C:\Users\user\my-project> pip install -U spacesense
...
14 ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a ...
...
Fix gdal dependencies#
Download those two wheel files.(Chose depending on your CPU)
For AMD CPU
Wheel for GDAL: GDAL-3.4.1-cp37-cp37m-win_amd64.whl
Wheel for rasterio: rasterio-1.2.10-cp37-cp37m-win_amd64.whl
For Intel CPU
Wheel for GDAL: GDAL-3.4.1-cp37-cp37m-win32.whl
Wheel for rasterio: rasterio-1.2.10-cp37-cp37m-win32.whl
Move the two wheels to a new folder called “libs” at the root of your project
build the wheels (make sure you are in your virtual environment created above)
For AMD CPU
pip install libs\GDAL-3.4.1-cp37-cp37m-win_amd64.whl libs\rasterio-1.2.10-cp37-cp37m-win_amd64.whl
For Intel CPU
pip install libs\GDAL-3.4.1-cp37-cp37m-win32.whl libs\rasterio-1.2.10-cp37-cp37m-win32.whl
Install SpaceSense library with pip
pip install -U spacesense
you are now ready to go.
Installing with Anaconda#
On Linux/macOS#
Create a virtual environment
conda create --name myenv python=3.7
Activate the virtual environment
conda activate myenv
Install the latest version of the client library
pip install -U spacesense
you are now ready to go.
On Windows#
Create a virtual environment
conda create --name myenv python=3.7
Activate the virtual environment
conda activate myenv
Upgrade install rasterio
conda install -c conda-forge rasterio
Install the latest version of the client library
pip install -U spacesense
you are now ready to go.
We want to make sure this project is as easy as possible to install. If something is not working as intended, make sure to let us know at support@spacesense.ai.