MagnetiCalc icon indicating copy to clipboard operation
MagnetiCalc copied to clipboard

Si-prefix depedency isn't working with Python 3.12

Open eigenlucy opened this issue 1 year ago • 1 comments

swapping to a 3.11.2 enviroment fixed it. I'm using Arch Linux with conda

The error

Collecting si-prefix
  Using cached si-prefix-1.2.2.tar.gz (64 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]
      /tmp/pip-install-rjmyf16r/si-prefix_9439d4d1b24c4efbb6c2ec4af4144cf3/versioneer.py:421: 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 "/tmp/pip-install-rjmyf16r/si-prefix_9439d4d1b24c4efbb6c2ec4af4144cf3/setup.py", line 11, in <module>
          version=versioneer.get_version(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-rjmyf16r/si-prefix_9439d4d1b24c4efbb6c2ec4af4144cf3/versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/tmp/pip-install-rjmyf16r/si-prefix_9439d4d1b24c4efbb6c2ec4af4144cf3/versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-rjmyf16r/si-prefix_9439d4d1b24c4efbb6c2ec4af4144cf3/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.

eigenlucy avatar Jun 26 '24 17:06 eigenlucy

@eigenlucy Thank you so much for reporting this.

This has now been fixed in the latest release of si-prefix! ¹

Please run pip install --upgrade si-prefix to update the package.

Could you confirm if that worked for you?

¹ See https://github.com/cfobel/si-prefix/pull/12

shredEngineer avatar Jul 11 '24 05:07 shredEngineer