Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tinkerdragon opened this issue Jun 2, 2024 · 1 comment

Comments

@tinkerdragon
Copy link

(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!

@pythonfortraders
Copy link

I was able to get around this by downgrading from 3.12 -> 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants