我尝试在PyCharm中导入"gdal“已经有几个小时了,但是没有成功,我现在不知道更多了。
在Anaconda Powershell中,我安装了gdal:
conda install gdal,
而这似乎是可行的,我得到了"#所有要求的软件包已经安装“。此外,当我点击conda list时,gdal被列为包之一(gdal 2.3.3)。
现在,它通常在PyCharm中工作。然而,这一次它没有。我试过的是:
import gdal上徘徊,试图安装软件包,但没有成功。在PyCharm中的有什么想法吗?谢谢!
发布于 2021-07-08 12:37:01
使用conda的最佳方法是安装conda环境,其中包含以下命令,然后在py魅力中使用相同的环境。
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)这样就能完成任务了。
https://stackoverflow.com/questions/62455459
复制相似问题