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

Installation fails with Python 3.12 #1927

Open
mikemc opened this issue May 23, 2024 · 3 comments
Open

Installation fails with Python 3.12 #1927

mikemc opened this issue May 23, 2024 · 3 comments

Comments

@mikemc
Copy link

mikemc commented May 23, 2024

The error appears to be the same as discussed at pydata/pandas-datareader#969. When I try installing with Python 3.12, I get

~ ❯ python3 -m venv khmerEnv
source khmerEnv/bin/activate
(khmerEnv) ~ ❯ pip install khmer

Collecting khmer
  Using cached khmer-2.1.1.tar.gz (8.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-install-e6nvyrxg/khmer_b293069cabde477f8035f0594cb322fb/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "/Users/michael/khmerEnv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/michael/khmerEnv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/michael/khmerEnv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-build-env-j3akbz40/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-build-env-j3akbz40/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-build-env-j3akbz40/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-build-env-j3akbz40/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 168, in <module>
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-install-e6nvyrxg/khmer_b293069cabde477f8035f0594cb322fb/versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-install-e6nvyrxg/khmer_b293069cabde477f8035f0594cb322fb/versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/f5/fqbhr9ps7dn058v21yczz_0r0000gn/T/pip-install-e6nvyrxg/khmer_b293069cabde477f8035f0594cb322fb/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: subprocess-exited-with-error

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

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

but I can install with Python 3.11.9 without error

@lskatz
Copy link

lskatz commented Jul 11, 2024

Can we update the conda recipe to python < 3.12 then?

@dr-joe-wirth
Copy link

I noticed this as well. I believe that SafeConfigParser was depricated and/or replaced with ConfigParser in 3.12. This is likely the source of the incompatibility.

@ctb
Copy link
Member

ctb commented Jul 15, 2024

hi folks,

note also this PR: #1922

discussion on maintenance moving forward here: #1928

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

4 participants