8000 Bugfix: unable to install with Python 3.12 by shabani1 · Pull Request #47 · lexy-ai/lexy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bugfix: unable to install with Python 3.12 #47

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

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

shabani1
Copy link
Contributor

What

Updated poetry lock file to enable installation with Python 3.12. If you're running 3.11 you don't need to do anything.

Why

Was previously adding new packages with poetry lock --no-update which didn't register new versions of numpy in the poetry.lock file, so the 3.12 distributions weren't available to poetry.

Test plan

First recreated the lexyserver and lexyworker images so that they're running new packages in poetry.lock.

docker compose up -d --no-deps --build lexyserver
docker compose up -d --no-deps --build lexyworker
docker compose restart lexyserver lexyworker

# verify that greenlet is now version 3.0.3
docker exec lexy-server pip freeze | grep -i greenlet

Then ran some regular tests.

  • Run pytest sdk-python in terminal
  • Run all cells in examples/tests.ipynb and verify that there are no errors
  • Run all cells in examples/tutorial.ipynb and verify that the tutorial works as expected
  • Run all cells in examples/images.ipynb and verify that the tutorial works as expected

Then tried installing in new virtualenv for Python 3.12.

mkdir tmp
cd tmp
python3.12 -m venv venv312
source venv312/bin/activate

# verify that your venv is running python 3.12
python --version

# install poetry
pip install poetry
# should now be able to install packages from poetry.lock without error
poetry install --no-root --with test,docs,dev -E "lexy_transformers"

One thing I have not done is run tests in 3.12. This just fixes the ability to install with 3.12. We still need a full test suite that covers different python versions.

@shabani1 shabani1 merged commit fb6859a into main Jan 24, 2024
@shabani1 shabani1 deleted the rs/bugfix-py312-installation branch January 24, 2024 04:10
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.

1 participant
0