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

Support Python 3.12 #286

Merged
merged 3 commits into from Feb 23, 2024
Merged

Support Python 3.12 #286

merged 3 commits into from Feb 23, 2024

Conversation

kitsuyui
Copy link
Owner

@kitsuyui kitsuyui commented Oct 6, 2023

@kitsuyui kitsuyui force-pushed the support-py312 branch 2 times, most recently from a5f0f74 to 1b973de Compare October 6, 2023 05:56
@kitsuyui
Copy link
Owner Author

kitsuyui commented Oct 6, 2023

It seems that currently PyTorch does not support Python 3.12 yet.


  RuntimeError

  Unable to find installation candidates for torch (2.1.0)

  at /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/poetry/installation/chooser.py:73 in choose_for
       69│ 
       70│             links.append(link)
       71│ 
       72│         if not links:
    →  73│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       74│ 
       75│         # Get the best link
       76│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       77│ 

- [x] Add CI for Python 3.12
- [x] Update lockfile
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.61%. Comparing base (5d90a2c) to head (93a9fdf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   99.61%   99.61%           
=======================================
  Files          42       42           
  Lines        1291     1291           
=======================================
  Hits         1286     1286           
  Misses          5        5           
Flag Coverage Δ
unittests 99.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kitsuyui kitsuyui merged commit f8a424f into main Feb 23, 2024
6 checks passed
@kitsuyui kitsuyui deleted the support-py312 branch February 23, 2024 04:47
@LyleZiegelmiller
Copy link

I'm able to install torch, but not pytorch:

$ pip install pytorch
Collecting pytorch
  Downloading pytorch-1.0.2.tar.gz (689 bytes)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pytorch
  Building wheel for pytorch (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pytorch (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "C:\Users\lyle_\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\lyle_\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\lyle_\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\cygwin64\tmp\pip-build-env-abzic7zo\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\cygwin64\tmp\pip-build-env-abzic7zo\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
          self.run_setup()
        File "C:\cygwin64\tmp\pip-build-env-abzic7zo\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\cygwin64\tmp\pip-build-env-abzic7zo\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 15, in <module>
      Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pytorch
Failed to build pytorch
ERROR: Could not build wheels for pytorch, which is required to install pyproject.toml-based projects

$ python --version
Python 3.12.2

Edition Windows 10 Pro
Version 22H2
Installed on ‎12/‎12/‎2023
OS build 19045.4170
Experience Windows Feature Experience Pack 1000.19054.1000.0

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

Successfully merging this pull request may close these issues.

None yet

3 participants