iT邦幫忙

0

安裝 python GDAL 版本問題

我搜尋我電腦的Python版本為3.9.2且我電腦是64位元

C:\Users\User>python
Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

所以我應該下載
https://ithelp.ithome.com.tw/upload/images/20210718/20136579X3q26Q81Iq.png
我將此whl檔下載後,放入anacondas內Scripts資料夾內(照著網路教學實作),
開啟anaconda prompt,輸入pip install 並將我的檔案拉進去,如下:

(base) C:\Users\User>pip install C:\Users\User\anaconda3\Scripts\GDAL-3.3.1-cp39-cp39-win_amd64.whl

但卻出現版本不相容問題

ERROR: GDAL-3.3.1-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

後來我改下載38版本的,
https://ithelp.ithome.com.tw/upload/images/20210718/20136579XeWY2ZtyQU.png
結果居然安裝成功,

(base) C:\Users\User>pip install C:\Users\User\anaconda3\Scripts\GDAL-3.3.1-cp38-cp38-win_amd64.whl
Processing c:\users\user\anaconda3\scripts\gdal-3.3.1-cp38-cp38-win_amd64.whl
GDAL is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.

請問有人知道為什麼嗎?
但我的python明明是39版本,
網路上還沒看到跟我一樣的

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
japhenchen
iT邦超人 1 級 ‧ 2021-07-19 07:43:58

不建議追最新版本,網上的問答大多都還是在3.8 以下版本,3.9真的變革很多,你用這版本只會很辛苦(找到的答案常常不能用)

pypl 的話,很多支援庫還不支援3.9+

cgc0800 iT邦新手 5 級 ‧ 2021-07-19 17:51:50 檢舉

謝謝你,我改安裝python 3.8試試看

我要發表回答

立即登入回答