[英]installing gdal in pycharm
我一直在嘗試在 PyCharm 中導入“gdal”幾個小時,但沒有成功,我現在也不知道了。
在 Anaconda Powershell 我安裝了gdal:
conda install gdal
,
這似乎有效,我得到“# All requested packages already installed”。 此外,當我點擊conda list
時,gdal 被列為軟件包之一(gdal 2.3.3)。
現在,它通常在 PyCharm 中工作。 然而,這一次沒有。 我嘗試了什么:
import gdal
上並嘗試安裝 package,但沒有成功。有任何想法嗎? 謝謝!
在任何地方使用 conda 的最佳方法是使用以下命令安裝 conda 環境,然后在 pycharm 中使用相同的環境。
Conda 環境安裝命令:
conda create -n gdal python=3.7
activate gdal
conda install -c conda-forge gdal
在 pycharm 中設置 conda 環境:
-> Go to Preferences / settings in pycharm
-> Search for `python interpreter`
-> Click on the drop down and then click on show all
-> Click on the + symbol to add the environment
-> Click on Conda environment in the left panel and select existing environment
-> Select the exact path of python3.7 (or other version) where the environment is installed (/opt/anaconda3/envs/gis/bin/python3.7 - in case of mac)
那應該可以完成工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.