Issues installing python mplcursors

2.7k Views Asked by At

I tried to install mplcursers to my PC. I tried:

pip install mplcursors

It gave me error as:

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

I also tried:

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

It gave me error as:

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/

Anyone has idea how I can solve the issue and install the mplcursors?

2

There are 2 best solutions below

0
Anshika Bhardwaj On

Try

!pip install plotly

It is working for me hope will work for you as well

0
Sanjay Manohar On

I was having the similar problems but a more useful error message:

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

I ran

  python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver mplcursors

And it fixed it