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

psycopg2 and Pyside6 not working yet in Python 3.13 #2986

Open
jkiviluo opened this issue Oct 19, 2024 · 8 comments
Open

psycopg2 and Pyside6 not working yet in Python 3.13 #2986

jkiviluo opened this issue Oct 19, 2024 · 8 comments
Assignees

Comments

@jkiviluo
Copy link
Member

jkiviluo commented Oct 19, 2024

python -m pip install -r requirements.txt on Windows 11, Python 3.13

Fails with

Collecting psycopg2 (from spinedb_api->-r requirements.txt (line 1))
  Downloading psycopg2-2.9.10.tar.gz (385 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.egg-info\PKG-INFO
      writing dependency_links to psycopg2.egg-info\dependency_links.txt
      writing top-level names to psycopg2.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
@jkiviluo jkiviluo changed the title Windows venv install broken Windows venv install broken for Python 3.13 Oct 19, 2024
@jkiviluo
Copy link
Member Author

Tried with Python 3.11.9 and it works fine.

@soininen
Copy link
Contributor

soininen commented Oct 21, 2024

Apparently psycopg2 nowadays requires a C compiler to install which I guess is a no-go even if they fix the build on Python 3.13. We could switch to the precompiled psycopg2-binary module instead.

(psycopg2 is used by SqlAlchemy to access postgresql databases, which we support in Importer and Exporter)

@soininen
Copy link
Contributor

Looks like psycopg2-binary has the same build issue on Windows as psycopg2. Not sure how to proceed.

@soininen
Copy link
Contributor

psycopg2 and psycopg2-binary install on my Windows 10 + Python 3.8 system without problems. Could this be a Windows 11 issue?

@soininen
Copy link
Contributor

I think I get it now: psycopg2 still does not have built packages for Windows + Python 3.13. Also, the packages are missing for Python 3.8 which makes our unit test GitHub actions fail.

@jkiviluo
Copy link
Member Author

Ok, I also wondered why my attempt to use psycopg2-binary failed. Does it mean that we just need to say not to use 3.13 for now?

@soininen
Copy link
Contributor

Does it mean that we just need to say not to use 3.13 for now?

Yes. I've now set the required Python to be between 3.9 and 3.13 for the time being. We should lift the upper bound once psycopg2 and PySide6 have working packages for 3.13.

@jkiviluo jkiviluo changed the title Windows venv install broken for Python 3.13 psycopg2 and Pyside6 not working yet in Python 3.13 Nov 5, 2024
@jkiviluo
Copy link
Member Author

jkiviluo commented Nov 5, 2024

Same thing in #2985

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

No branches or pull requests

2 participants