【问题标题】:Issues installing python mplcursors安装 python mplcursors 的问题
【发布时间】:2021-08-03 11:41:12
【问题描述】:

我尝试将 mplcursers 安装到我的 PC 上。 我试过了:

pip install mplcursors

它给了我错误:

Collecting mplcursors
Could not find a version that satisfies the requirement mplcursors (from versions: )
No matching distribution found for mplcursors

我也试过了:

pip install git+https://github.com/anntzer/mplcursors

它给了我错误:

Collecting git+https://github.com/anntzer/mplcursors
Cloning https://github.com/anntzer/mplcursors to /tmp/pip-VP7mtD-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-VP7mtD-build/setup.py", line 1, in <module>
    from setupext import find_packages, setup
  File "setupext.py", line 16, in <module>
    from pathlib import Path
ImportError: No module named pathlib

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-VP7mtD-build/

有人知道我该如何解决这个问题并安装 mplcursors 吗?

【问题讨论】:

  • 你安装了哪个matplotlib版本?您是否尝试升级到最新版本?你用的是哪个python版本?
  • 我的matplotlib版本是3.3.4,最近才安装
  • 您的 Python 安装似乎有问题。在任何情况下,mplcursors 只包含 2 个 python 文件 (github.com/anntzer/mplcursors/tree/master/lib/mplcursors),在极端情况下,您可以将其复制到本地目录并直接使用它们。
  • 复制哪两个文件? mlpcursor.py 和 pick_info.py?
  • 确实如此。这只是一个临时解决方案。真正的可能是完全重新安装 Python。

标签: python matplotlib mplcursors


【解决方案1】:

试试

!pip install plotly

它对我有用,希望对你也有用

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 2022-09-25
    • 2019-04-15
    • 2020-09-21
    • 2017-06-01
    相关资源
    最近更新 更多