agronholm / sqlacodegen

Automatic model code generator for SQLAlchemy
Other
1.78k stars 235 forks source link

Installed on my windows10 python 3.12.4, get incompatible error #337

Open CHN-STUDENT opened 5 days ago

CHN-STUDENT commented 5 days ago

Things to check first

Sqlacodegen version

2.3.0.post1

SQLAlchemy version

SQLAlchemy-2.0.31

RDBMS vendor

MySQL (or compatible)

What happened?

C:\Users\ipc>pip install sqlacodegen
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: sqlacodegen in c:\program files\python312\lib\site-packages (2.3.0.post1)
Collecting SQLAlchemy<2.0,>=0.9.0 (from sqlacodegen)
  Using cached http://mirrors.aliyun.com/pypi/packages/49/62/d0e4502e27eaa10da35243d5241c3be3ed3974d607281e3b4ccc065d9853/SQLAlchemy-1.4.52-cp312-cp312-win_amd64.whl (1.6 MB)
Requirement already satisfied: inflect>=0.2.0 in c:\program files\python312\lib\site-packages (from sqlacodegen) (7.3.0)
Requirement already satisfied: more-itertools in c:\program files\python312\lib\site-packages (from inflect>=0.2.0->sqlacodegen) (10.3.0)
Requirement already satisfied: typeguard>=4.0.1 in c:\program files\python312\lib\site-packages (from inflect>=0.2.0->sqlacodegen) (4.3.0)
Requirement already satisfied: greenlet!=0.4.17 in c:\users\ipc\appdata\roaming\python\python312\site-packages (from SQLAlchemy<2.0,>=0.9.0->sqlacodegen) (3.0.3)
Requirement already satisfied: typing-extensions>=4.10.0 in c:\program files\python312\lib\site-packages (from typeguard>=4.0.1->inflect>=0.2.0->sqlacodegen) (4.12.2)
Installing collected packages: SQLAlchemy
  Attempting uninstall: SQLAlchemy
    Found existing installation: SQLAlchemy 2.0.31
    Uninstalling SQLAlchemy-2.0.31:
      Successfully uninstalled SQLAlchemy-2.0.31
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fastapi-users-db-sqlalchemy 6.0.1 requires sqlalchemy[asyncio]<2.1.0,>=2.0.0, but you have sqlalchemy 1.4.52 which is incompatible.
Successfully installed SQLAlchemy-1.4.52
C:\Users\ipc>pip install --upgrade SQLAlchemy
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: SQLAlchemy in c:\program files\python312\lib\site-packages (1.4.52)
Collecting SQLAlchemy
  Using cached http://mirrors.aliyun.com/pypi/packages/d0/ff/5746886a796799d45285573c8a6564b4b84c730142ab974d7a3f7bacee6c/SQLAlchemy-2.0.31-cp312-cp312-win_amd64.whl (2.1 MB)
Requirement already satisfied: typing-extensions>=4.6.0 in c:\program files\python312\lib\site-packages (from SQLAlchemy) (4.12.2)
Requirement already satisfied: greenlet!=0.4.17 in c:\users\ipc\appdata\roaming\python\python312\site-packages (from SQLAlchemy) (3.0.3)
Installing collected packages: SQLAlchemy
  Attempting uninstall: SQLAlchemy
    Found existing installation: SQLAlchemy 1.4.52
    Uninstalling SQLAlchemy-1.4.52:
      Successfully uninstalled SQLAlchemy-1.4.52
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sqlacodegen 2.3.0.post1 requires SQLAlchemy<2.0,>=0.9.0, but you have sqlalchemy 2.0.31 which is incompatible.
Successfully installed SQLAlchemy-2.0.31
C:\Users\ipc>pip install --upgrade  sqlacodegen
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: sqlacodegen in c:\program files\python312\lib\site-packages (2.3.0.post1)
Collecting SQLAlchemy<2.0,>=0.9.0 (from sqlacodegen)
  Using cached http://mirrors.aliyun.com/pypi/packages/49/62/d0e4502e27eaa10da35243d5241c3be3ed3974d607281e3b4ccc065d9853/SQLAlchemy-1.4.52-cp312-cp312-win_amd64.whl (1.6 MB)
Requirement already satisfied: inflect>=0.2.0 in c:\program files\python312\lib\site-packages (from sqlacodegen) (7.3.0)
Requirement already satisfied: more-itertools in c:\program files\python312\lib\site-packages (from inflect>=0.2.0->sqlacodegen) (10.3.0)
Requirement already satisfied: typeguard>=4.0.1 in c:\program files\python312\lib\site-packages (from inflect>=0.2.0->sqlacodegen) (4.3.0)
Requirement already satisfied: greenlet!=0.4.17 in c:\users\ipc\appdata\roaming\python\python312\site-packages (from SQLAlchemy<2.0,>=0.9.0->sqlacodegen) (3.0.3)
Requirement already satisfied: typing-extensions>=4.10.0 in c:\program files\python312\lib\site-packages (from typeguard>=4.0.1->inflect>=0.2.0->sqlacodegen) (4.12.2)
Installing collected packages: SQLAlchemy
  Attempting uninstall: SQLAlchemy
    Found existing installation: SQLAlchemy 2.0.31
    Uninstalling SQLAlchemy-2.0.31:
      Successfully uninstalled SQLAlchemy-2.0.31
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fastapi-users-db-sqlalchemy 6.0.1 requires sqlalchemy[asyncio]<2.1.0,>=2.0.0, but you have sqlalchemy 1.4.52 which is incompatible.
Successfully installed SQLAlchemy-1.4.52

Installed on my windows10 python 3.12.4, get incompatible error

Database schema for reproducing the bug

No response

agronholm commented 5 days ago

Please try the latest pre-release version.

CHN-STUDENT commented 5 days ago

@agronholm should i install sqlcodegen by using pip install --pre sqlacodegen? It seems work. image

agronholm commented 5 days ago

Yes.