anntzer / mplcursors

Interactive data selection cursors for Matplotlib.
https://mplcursors.readthedocs.io
zlib License
113 stars 19 forks source link

Installation with pip fails if setuptools_scm not installed #61

Closed arnaudrichard closed 1 year ago

arnaudrichard commented 1 year ago

Using python 3.11.2 on Windows, and pip 23.0.1 I tried many pip options to install mplcursors due to misleading warnings until I found out "setuptools_scm" was missing. Maybe there's a way to specify this dependency in the package ?

anntzer commented 1 year ago

Can you post the output of pip install -v mplcursors?

arnaudrichard commented 1 year ago
C:\Users\richarda>pip install -v mplcursors
Using pip 23.0.1 from C:\Users\richarda\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11)
Requirement already satisfied: mplcursors in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (0.5.2)
Requirement already satisfied: matplotlib>=3.1 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from mplcursors) (3.7.1)
Requirement already satisfied: contourpy>=1.0.1 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (1.0.7)
Requirement already satisfied: cycler>=0.10 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (4.39.3)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (1.4.4)
Requirement already satisfied: numpy>=1.20 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (1.24.2)
Requirement already satisfied: packaging>=20.0 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (23.0)
Requirement already satisfied: pillow>=6.2.0 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (9.5.0)
Requirement already satisfied: pyparsing>=2.3.1 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from matplotlib>=3.1->mplcursors) (2.8.2)
Requirement already satisfied: six>=1.5 in c:\users\richarda\appdata\local\programs\python\python311\lib\site-packages (from python-dateutil>=2.7->matplotlib>=3.1->mplcursors) (1.16.0)
anntzer commented 1 year ago

I meant the output of the failing install when you don't have setuptools_scm and mplcursors installed yet (you'll need to pip uninstall mplcursors setuptools_scm first).

arnaudrichard commented 1 year ago

pip.log

anntzer commented 1 year ago

Are you by any chance behind a proxy?

arnaudrichard commented 1 year ago

yep. And to make things worse a http proxy with authentication. I pass the "--proxy" option to pip and it worked for all other packages installed, including automatically their dependencies. (for example numpy, matplotlib, pandas, scipy) That's why I guess something can be improved in this one.

anntzer commented 1 year ago

Have you tried setting the http_proxy and https_proxy environment variables, as documented at https://pip.pypa.io/en/stable/user_guide/#using-a-proxy-server? This is what I usually do instead.

arnaudrichard commented 1 year ago

Nop, and I won't try because I already found a work-around with the installation of "setuptools_scm". I opened this ticket in case someone wants to improve the package.

anntzer commented 1 year ago

The alternate solution would be to use pyproject.toml to specify the dependency, but if using pyproject.toml you'd need to also require setuptools>=64 to support editable installs, which would then break support for Py3.6. Given that an alternate solution exists for proxy support, I'd rather also keep support for editable installs and for Py3.6 (unless you verify that setting the environment variable doesn't work for you). Thanks for pointing out the limitation, though.