Open nekomeowww opened 1 week ago
I have the same problem :/
Hi there,
Thank you for reporting this issue.
The error you're encountering occurs because Python 3.13 has removed several legacy standard library modules, including cgi
, as per PEP 594 – Removing dead batteries from the standard library. One of our dependencies, htmlmin
, relies on the cgi
module, which leads to the installation failure you've observed.
At this time, Label Studio does not officially support Python 3.13. We recommend using Python 3.10 or earlier versions, which are fully supported. Please consider installing Label Studio using Python 3.10:
# Create a virtual environment with Python 3.10mamba create -n labelstudio-env python=3.10 -ymamba activate labelstudio-envpip install label-studio
We are actively working on updating our dependencies to ensure compatibility with newer Python versions, including Python 3.13. We appreciate your patience and will notify our users once Label Studio supports Python 3.13.
Thanks,
Tyler Conlee Head of Support HumanSignal
Comment by Tyler Conlee Workflow Run
hello. It's unofficial, but you can use label-studio in python 3.13 using the following method.
// CONDA_ENV_PATH : /home/
$ conda activate <ENV_NAME>
$ sudo apt-get install libpq-dev
$ pip install legacy-cgi
$ pushd CONDA_ENV_PATH
$ cp site-packages/cgi.py .
$ popd
$ pip install label-studio
$ pushd CONDA_ENV_PATH
$ rm -rf site-packages/psycopg2*
$ popd
$ git clone https://github.com/psycopg/psycopg2
$ cd psycopg2
$ python setup.py build
$ python setup.py install
$ <RUN LABEL-STUDIO CMD>
Hi folks, this was addressed in https://github.com/HumanSignal/label-studio/pull/6534 but we haven't published a release to pypi or brew yet, that will take another couple of weeks or so. If you'd like, you could clone the repo and build a label-studio wheel yourself (using poetry build
).
Note also that Django 4.2 LTS which this build uses doesn't actually officially support Python 3.13 afaik, see https://docs.djangoproject.com/en/5.1/releases/4.2/#python-compatibility; however, with the fixes I made, there are no longer any issues with dependency conflicts or failing builds.
We are actively working on updating our dependencies to ensure compatibility with newer Python versions, including Python 3.13. We appreciate your patience and will notify our users once Label Studio supports Python 3.13.
Thanks
Hi folks, this was addressed in https://github.com/HumanSignal/label-studio/pull/6534 but we haven't published a release to pypi or brew yet, that will take another couple of weeks or so. If you'd like, you could clone the repo and build a label-studio wheel yourself (using poetry build).
So quickly, awesome!
Describe the bug
Python 3.13 is released at Oct 7, currently, we can no longer install
label-studio
in Python 3.13:To Reproduce
mamba create -n labelstudio-cgi-repro python=3.13 -y
mamba activate labelstudio-cgi-repro
pip install label-studio
Expected behavior
With the release note says (https://docs.python.org/3/whatsnew/3.13.html), due to the suggested PEP 594 – Removing dead batteries from the standard library:
Therefore all the dependencies that used the deprecated std libs will throw this error.
The
htmlmin
is used inlabel-studio
, it seems the currect active module ishtmlmin2
instead ofhtmlmin
from test with 3.13 by Remi-Gau · Pull Request #32 · christiansandberg/pytest-reporter-html1 as well as mentioning at Deprecation Warning: 'cgi' is deprecated and slated for removal in Python 3.13 · Issue #66 · mankyd/htmlmin.Not sure what is the best move, can I just replace the
htmlmin
wthhtmlmin2
? Many of other dependencies are not yet tested completely.Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
h4862095_100_cp313
)label_studio-1.13.1-py3-none-any.whl
)Additional context