Skip to content

Error during installation python 3.12 #12

Description

@gluxux

During the installation on a newer version of Python (3.12.7) in an Ubuntu environment, the installation instruction "pip install jsonstat.py" get an error that stop the process.
The error you're encountering during the installation of jsonstat.py on Ubuntu with Python 3.12 is due to the fact that the SafeConfigParser class no longer exists in the configparser module starting from Python 3.12. This is because SafeConfigParser was renamed to ConfigParser as early as Python 3.2, but it remained available as an alias until Python 3.11. In Python 3.12, the alias has been removed.

So a line that contain "configparser.SafeConfigParser()" must be replaced with:

from configparser import ConfigParser
parser = ConfigParser()

This the log:

Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Traceback (most recent call last):
File "/home/eraclio/py_envs/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in
main()
File "/home/eraclio/py_envs/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eraclio/py_envs/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rp2dq4_e/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-rp2dq4_e/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-rp2dq4_e/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-rp2dq4_e/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "", line 812, in
File "/tmp/pip-install-vkjf24y2/pandas_9a4c51478d9a4fbe9453a6fa3396ae0b/versioneer.py", line 1440, in get_version
return get_versions()["version"]
^^^^^^^^^^^^^^
File "/tmp/pip-install-vkjf24y2/pandas_9a4c51478d9a4fbe9453a6fa3396ae0b/versioneer.py", line 1369, in get_versions
cfg = get_config_from_root(root)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-install-vkjf24y2/pandas_9a4c51478d9a4fbe9453a6fa3396ae0b/versioneer.py", line 401, 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: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions