quantopian / alphalens

Performance analysis of predictive (alpha) stock factors
http://quantopian.github.io/alphalens
Apache License 2.0
3.29k stars 1.14k forks source link

cant install alphalens from pip because of outdated configparser method call #406

Open tinkerdragon opened 4 months ago

tinkerdragon commented 4 months ago

(stocks) C:\Users\stanley>pip install alphalens Collecting alphalens Using cached alphalens-0.4.0.tar.gz (24.0 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [18 lines of output] C:\Users\stanley\AppData\Local\Temp\pip-install-kx2jl_pm\alphalens_7eff4e4e7ff74df7bc217277410482f0\versioneer.py:421: SyntaxWarning: invalid escape sequence '\s' LONG_VERSION_PY['git'] = ''' Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\stanley\AppData\Local\Temp\pip-install-kx2jl_pm\alphalens_7eff4e4e7ff74df7bc217277410482f0\setup.py", line 35, in version=versioneer.get_version(), ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\stanley\AppData\Local\Temp\pip-install-kx2jl_pm\alphalens_7eff4e4e7ff74df7bc217277410482f0\versioneer.py", line 1480, in get_version return get_versions()["version"] ^^^^^^^^^^^^^^ File "C:\Users\stanley\AppData\Local\Temp\pip-install-kx2jl_pm\alphalens_7eff4e4e7ff74df7bc217277410482f0\versioneer.py", line 1412, in get_versions cfg = get_config_from_root(root) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\stanley\AppData\Local\Temp\pip-install-kx2jl_pm\alphalens_7eff4e4e7ff74df7bc217277410482f0\versioneer.py", line 342, in get_config_from_root parser = configparser.SafeConfigParser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

(stocks) C:\Users\stanley>python --version Python 3.12.2

the SafeConfigParser() method has been merged into ConfigParser() method. you guys should update that versioneer.py its from 7 yrs ago!