-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incompatible with Python 3.12 #522
Comments
Thank you for reporting, @lrq3000 ! Updating |
I'm very new to python. Literally just got it to use khoj with obsidian. How do I update requirements, or downgrade to python 3.11? |
@ststudio907 As long as you can't see a "cp312" package here, pytorch is not available for py3.12 and hence py<=3.11 is required. An easy way to get py3.11 or any othes version is to install a miniconda distribution with python 3.11, or if you already have it, create an environment under python 3.11. |
Thanks for the initial investigation @lrq3000. Khoj should support python 3.12 once PR #690 is merged. This got unblocked since Pytorch added support for python 3.12 in mainline version 2.2.2. |
- RapidOCR for indexing image PDFs doesn't currently support python 3.12. It's an optional dependency anyway, so only install it if python < 3.12 - Run unit tests with python version 3.12 as well Resolves #522
That's great to hear, thank you for the heads up! |
### Why - Python 3.12 is the default Python on Ubuntu 24.04 LTS, Windows and Mac via Homebrew - Python 3.12 has a bunch of improvements that can be explored with Khoj (e.g per core GIL for performance) ## Changes - The latest PyTorch now supports Python 3.12 - RapidOCR for indexing image PDFs doesn't currently support python 3.12. But it's an optional dependency, so only install it if python < 3.12 ### Testing - Verified Khoj installs fine on Windows and Mac with Python 3.12 - Verified Khoj chat works fine on Mac, Windows with Python 3.12 Resolves #522
Just to let you guys know that the pre-release/github version of
khoj-assistant
(hash 9677eae) is currently incompatible with Python 3.12 because of two issues:pyproject.toml
requirespyyaml==6.0
, which causes anAttributeError: cython_sources
as described here. Updating the requirement topyyaml>=6.0
or using Python 3.11 without changing this requirement fixes this issue.torch
requirement does not yet offer builds for Python 3.12, the latest supported version is Python 3.11. This issue cannot be fixed currently (as of October 2023).So there is nothing to do but wait, I am just reporting this issue in case others get the same error.
The text was updated successfully, but these errors were encountered: