Note Cài Python và GDAL Win 10

Table of Contents

Cài đặt Python 3.6 Không hiểu lý do gì cài bản 2.x không được, cài bản 2.x sẽ lỗi như hình

[caption id="" align="aligncenter" width="500"]Lỗi cài python 2x trên win10 Lỗi cài python 2x trên win10[/caption]
Cài bản Python 3.6 (mới nhất đến thời điểm hiện tại) thì Ok. Ấn tượng nhất dòng chữ “Python for Windows would still be Python for DOS”
[caption id="" align="aligncenter" width="500"]Cài thành công Python 3x trên win10 Cài thành công Python 3x trên win10[/caption]

Download GDAL for Python

Vào trang http://www.lfd.uci.edu/~gohlke/pythonlibs/ Tìm dòng GDAL
[caption id="" align="aligncenter" width="500"]Download GDAL đúng version Download GDAL đúng version[/caption]
Lưu ý, Python mình cài bản x86 dù máy mình là x64, do vậy ở đây mình sẽ down bản x86 tương ứng với version của python là 3.6
GDAL-[GDAL version]-cp[python version]-none-[architecture].whl
GDAL-2.1.3-cp36-cp36m-win32.whl

Cài đặt GDAL

Mở CMD lên, sử dụng lệnh
pip install GDAL-2.1.3-cp36-cp36m-win32.whl
[caption id="" align="aligncenter" width="500"]Cài đặt GDAL bằng python và kiểm tra Cài đặt GDAL bằng python và kiểm tra[/caption]

Kiểm tra

Chạy lệnh
python
import ogr
-soiqualang_chentreu-
]]>

Leave a Reply

Your email address will not be published. Required fields are marked *