gpt4 book ai didi

python - 导入Cartopy时ImportError : DLL load failed while importing trace: The specified module could not be found

转载 作者:行者123 更新时间:2023-12-05 01:24:15 31 4
gpt4 key购买 nike

我安装了 Christoph Gohlke的预制轮子 Cartopy‑0.20.2‑cp39‑cp39‑win_amd64.whl 在事件的虚拟环境中使用 pip。环境使用Python 3.9.5。尝试导入 Cartopy 时,我收到以下错误消息。这以前可以工作,现在不再工作了,我不明白为什么。有谁知道可能是什么问题或我遗漏了什么?

---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [4], in <cell line: 1>()
----> 1 import cartopy
2 import cartopy.crs as ccrs
3 import cartopy.io.img_tiles as cimgt

File ~\Downloads\GitHub\Project\venv\lib\site-packages\cartopy\__init__.py:110, in <module>
105 pass
108 # Commonly used sub-modules. Imported here to provide end-user
109 # convenience.
--> 110 import cartopy.crs
111 import cartopy.feature

File ~\Downloads\GitHub\Project\venv\lib\site-packages\cartopy\crs.py:27, in <module>
24 from pyproj.exceptions import ProjError
25 from shapely.prepared import prep
---> 27 import cartopy.trace
30 try:
31 # https://github.com/pyproj4/pyproj/pull/912
32 from pyproj.crs import CustomConstructorCRS as _CRS

ImportError: DLL load failed while importing trace: The specified module could not be found.

最佳答案

As mentioned by cgohlke在评论中,安装轮子shapelypyproj从他的网站上解决了这个问题。

如果库已经安装,使用--force-reinstall 覆盖现有安装。

关于python - 导入Cartopy时ImportError : DLL load failed while importing trace: The specified module could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71557674/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com