installationpippython-3.13

Unable to install pyfolio


C:\WINDOWS\system32>pip install pyfolio
Collecting pyfolio
  Using cached pyfolio-0.9.2.tar.gz (91 kB)
  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\Winod Dhamnekar\AppData\Local\Temp\pip-install-p7nv43_t\pyfolio_14ad331ba5cf4f91ac9cb9e3470e3bf8\versioneer.py:468: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Winod Dhamnekar\AppData\Local\Temp\pip-install-p7nv43_t\pyfolio_14ad331ba5cf4f91ac9cb9e3470e3bf8\setup.py", line 71, in <module>
          version=versioneer.get_version(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Winod Dhamnekar\AppData\Local\Temp\pip-install-p7nv43_t\pyfolio_14ad331ba5cf4f91ac9cb9e3470e3bf8\versioneer.py", line 1407, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "C:\Users\Winod Dhamnekar\AppData\Local\Temp\pip-install-p7nv43_t\pyfolio_14ad331ba5cf4f91ac9cb9e3470e3bf8\versioneer.py", line 1341, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Winod Dhamnekar\AppData\Local\Temp\pip-install-p7nv43_t\pyfolio_14ad331ba5cf4f91ac9cb9e3470e3bf8\versioneer.py", line 399, 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.

C:\WINDOWS\system32>

I activated older python environment py3.8 and py 3.6 but that also failed to install pyfolio.

I modified versioneer.py file in downloaded zip file pyfolio 0.9.2.tar by replacing 'SafeConfigParser' with 'ConfigParser' using text editor 'Notebook' application on Windows 10. But that attempt also failed to install pyfolio.

I also used the command 'conda install -c conda-forge pyfolio' at administrator command prompt. But that also failed to install 'Pyfolio'.


Solution

  • The stable release of pyfolio i.e. 0.9.2 is compatible with Python 2.7, 3.4 and 3.5. It hasn't been maintained since 2019.

    I would suggest using pyfolio-reloaded which is actively maintained and supports Python 3.9 - 3.12.