matplotlib / matplotlib/cmocean
wrong version of matplotlib?
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 269
- 派生
- 54
- PR 合并指标
- 30 天内没有已合并 PR
描述
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[27], line 1
----> 1 import cmocean
File ~/opt/anaconda3/lib/python3.9/site-packages/cmocean/__init__.py:11
8 from __future__ import absolute_import
10 # from cmocean import *
---> 11 from . import cm, tools, data
13 __all__ = ['cm',
14 'tools',
15 'plots',
16 'data']
18 __authors__ = ['Kristen Thyng ']
File ~/opt/anaconda3/lib/python3.9/site-packages/cmocean/cm.py:34
30 cmap_d = dict()
33 # a comparable version object
---> 34 MPL_VERSION = Version(version("matplotlib"))
36 def _register_cmap(cmap, *, name):
37 # wrap matplotlib.cm API, use non-deprecated API when available
38 if MPL_VERSION >= Version("3.5"):
File ~/opt/anaconda3/lib/python3.9/site-packages/packaging/version.py:196, in Version.__init__(self, version)
185 """Initialize a Version object.
186
187 :param version:
(...)
192 exception will be raised.
193 """
195 # Validate the version and parse it into pieces
--> 196 match = self._regex.search(version)
197 if not match:
198 raise InvalidVersion(f"Invalid version: '{version}'")
TypeError: expected string or bytes-like object
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在所示的 Python 3.9 Anaconda 环境中重现导入失败,然后检查 cmocean/cm.py 中 MPL_VERSION 赋值和 matplotlib 版本查找附近的代码。对于相关的 matplotlib 安装,导入 cmocean 不再引发所报告的 TypeError 即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- matplotlib, python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100