我尝试将 mplcursers 安装到我的电脑上。 我试过:
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?
尝试
!pip install plotly
它对我有用,希望对你也有用
我遇到了类似的问题,但有更有用的错误消息:
Discarding https://files.pythonhosted.org/packages/70/11/26f6016ff1ed7c43b5ee51793ac9f9d14ea7f5af8e2ecf9703d8bb88c96b/mplcursors-0.5.3.tar.gz (from https://pypi.org/simple/mplcursors/) (requires-python:>=3.7): Requested mplcursors from https://files.pythonhosted.org/packages/70/11/26f6016ff1ed7c43b5ee51793ac9f9d14ea7f5af8e2ecf9703d8bb88c96b/mplcursors-0.5.3.tar.gz has inconsistent version: expected '0.5.3', but metadata has '0.0.0'
Using cached mplcursors-0.5.2.tar.gz (89 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
我跑了
python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver mplcursors
它修复了它