gpt4 book ai didi

python - ImportError : cannot import name 'is_scalar' in Python 3. 6 虚拟环境

转载 作者:太空宇宙 更新时间:2023-11-03 17:03:23 26 4
gpt4 key购买 nike

我已经为 python 3.6 创建了一个虚拟环境。如 matplotlib/basecamp GitHub repository 中所述,我已经通过命令安装了 basemap -

pip install --user git+https://github.com/matplotlib/basemap.git

当我尝试像这样导入 basemap 时,

from mpl_toolkits.basemap import Basemap

我得到了错误

ImportError: cannot import name 'is_scalar' 

我正在使用 Ubuntu 18.04 LTS。

最佳答案

这在 matplotlib Basemap Github Issues 中得到了回答.

It looks like you have an older version of basemap. This has already been fixed and is in the released version v1.2.0.

Some notes: basemap is considered deprecated in favor of the cartopy package. Please learn cartopy instead. Second, the preferred method of installing basemap (or cartopy) is through conda-forge due to its complex build process and dependencies.

关于python - ImportError : cannot import name 'is_scalar' in Python 3. 6 虚拟环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59166882/

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