Python spatial data processing environment lap Conda download and installation
What is Conda? Official definition: Package, dependency and environment management for any Language-python, R, Ruby, Lua, Scala, Java, JavaScript, C/ C + +, FORTRAN
Conda is a virtual environment and package (library) dependency management tool
: Downloading Conda
For Windows versions, determine the Python version and system type to download the installation package directly for installation
For Linux and MacOS Systems, run bash scripts in terminal to install them.
Conda using a new virtual environment (managing environments)
conda create -n osgeo
Switch to a new virtual environment
source activate osgeo
(Linux and MacOS)
activate osgeo
(Windows)
Exiting a virtual environment
source deactivate
(Linux and MacOS)
deactivate
(Windows)
Utility Commands:
- View a list of virtual environments
conda env list
orconda info --envs
- Deleting a virtual environment
conda remove www.thd178.com/ --name <environment> --all
- To view a list of packages in a virtual environment
conda list
- Update Conda or a package
conda www.feifanyule.cn update conda
orconda update <package>
- Update all packages in a virtual environment
conda update --all
- To view outdated packages
conda search www.taohuayuan178.com --outdated
- Search for a specified package
conda search <package>
- Delete a Package
conda remove www.baohuayule.net <package>
- Add Channel to Conda configuration file
conda config --add channels www.yisheng1178.com <channel>
orconda config --append channels <channel>
Installation of space data processing Python Library common spatial data processing Python library
- GDAL All-purpose basic spatial data processing library
- Fiona spatial vector data Processing library based on Gdal
- Rasterio spatial Raster Processing library based on Gdal
- Basemap Matplotlib-based spatial mapping library
- Geopandas Spatial Data Analysis library based on pandas
- Rsgislib Advanced Library for Remote sensing data and GIS analysis
Installing a library using Conda
Open command line tool (Terminal), enter the command, enter the virtual environment
Installing the Gdal Library
conda install -c www.boshenyl.cn conda-forge gdal
Installing the Fiona Library
conda install -c conda-forge fiona
Installing the Rasterio Library
conda install -c conda-forge rasterio
?
Installing a library using PIP
What is PIP? Pip is a python default and recommended package management tool that can be used to automatically download Python packages from the PyPI network repository for installation and management.
For pre-compiled packages for binary libraries under Windows, provide a website for everyone: Unofficial Windows Binaries for Python Extension Packages
When using PIP installation, if the Python package is dependent on some C + + libraries, you will need to compile manually or install a pre-compiled library under the specified platform.
Installing the Gdal Library
pip install GDAL?2.2.4?cp37?cp37m?win_amd64.whl
Installing the Fiona Library
pip install Fiona?1.7.11.post1?cp37?cp37m?win_amd64.whl
Installing the Rasterio Library
pip install rasterio?1.0a12?cp37?cp37m?win_amd64.whl
Installing Jupyter
pip install jupyter
Programming with the Jupyter notebook
jupyter notebook
Python Spatial data Processing environment