label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Error installing on Windows 10 or 11 python 3.12.3 related to psycopg2-binary==2.9.6

Open marcocaggioni opened this issue 1 year ago • 2 comments

Describe the bug Hope this is the right classification for this error. Thanks for your great tool!

Installing on windows 10 or 11 raises an error related to psycopg2-binary==2.9.6 I think is just related to windows.

Update: I just realized it works with python 3.11.9 and not with 3.12.3

To Reproduce Steps to reproduce the behavior:

  1. pip install label-studio (on windows 10 or 11)
  2. shows the error
  Collecting psycopg2-binary==2.9.6 (from label-studio)
  Using cached psycopg2-binary-2.9.6.tar.gz (384 kB)
  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
  ╰─> [21 lines of output]
      running egg_info
      writing psycopg2_binary.egg-info\PKG-INFO
      writing dependency_links to psycopg2_binary.egg-info\dependency_links.txt
      writing top-level names to psycopg2_binary.egg-info\top_level.txt

      Error: pg_config executable not found.

      pg_config is required to build psycopg2 from source.  Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:

          python setup.py build_ext --pg-config /path/to/pg_config build ...

      or with the pg_config option in 'setup.cfg'.

      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.

      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).

      [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.

Environment (please complete the following information):

  • OS: windows 10 or 11
  • Label Studio Version 1.11.0

marcocaggioni avatar Apr 16 '24 01:04 marcocaggioni

My apologies, the error is related to the python version. It works with python 3.11.9 and not with 3.12.3

marcocaggioni avatar Apr 16 '24 01:04 marcocaggioni

Change psycopg2-binary version form psycopg2-binary==2.9.6 to psycopg2-binary==2.9.9 inside poetry.lock it will work.

kashinath12345 avatar Apr 16 '24 06:04 kashinath12345

If psycopg2-binary==2.9.6 is changed to psycopg2-binary==2.9.9 it will work fine.

Julio-Wyn avatar May 06 '24 08:05 Julio-Wyn

It should be in the develop branch already, please try using ls from the github repo.

makseq avatar May 06 '24 09:05 makseq