Installation of gdal in Python environment

Source: Internet
Author: User

Cause: Need to do a city expansion of things, and then on GitHub to download a piece of code, but the author did not explain how to use, in the morning to spend half a day, due to I need to download the Python gdal module first.

About: Search down, found Gdal (Geospatial data Abstraction Library) is an open source raster spatial data read/convert library, can easily read the remote sensing data in various formats, is a remote sensing or the field of expertise often used a library. Can be used to access and process geospatial data.

Installation: First to make clear a doubt, online installation tutorial There are several, one of the more complex, need to compile themselves and so on, need swig compile, modify nmake.opt and so on, look at me foggy.

Self-compiling-source code download: Http://trac.osgeo.org/gdal/wiki/DownloadSource

Reference Tutorial: 6945452

78416953

Then you see another simple version, download the. msi file can be installed directly, configure the path on the line.

Direct Installation-Module download: http://www.gisinternals.com/

Reference Tutorial: 8018965

Https://jingyan.baidu.com/article/647f0115b7b08d7f2148a8db.html

Http://blog.sina.com.cn/s/blog_ed1c38ba0102x1ob.html

73250889

73250888

Often this time, began to do not know Wow, in the end is a simple method, or a difficult way, the two methods in the end what difference, can be successful, in the end to download how many things, configure how many environment, confused.

Let's try it:

Select the direct installation method-Download the required modules on the website above.

1. See what version of Python you are-open cmd-directly (if you are prompted that Python is not an internal command need to add a path to the environment variable) look at 64 in the red box instead of the back on Win32 ...

2. Download the appropriate installation package to the website: the above site-http://www.gisinternals.com/into stable releases I choose the latest 64-bit red box to download the corresponding py2.7

After downloading, first install core, direct point point, all the way smoothly, installation completed;

Then add the path, find the GDAL path that you just installed, my C:\Program files\gdal add this path to the system variable, my Computer, right-click Properties, advanced Variables->....path

Next, install the remaining gdal and Python connector files, install directly, but the installation process has a column inside to choose the address, I was based on Baidu experience tutorial inside https://jingyan.baidu.com/article/ 647f0115b7b08d7f2148a8db.html that set of C:\Python27\Lib\site-packages, but there are some changes to follow, but some tutorials say no matter what path, directly installed on the line, all try it

It's a success here,

Detection: From OSGeo import gdal wait for a try.

PS: There is a simpler, WHL file installation,

70161344

77005083

Installation of gdal in Python environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.