agronholm / sqlacodegen

Automatic model code generator for SQLAlchemy
Other
1.91k stars 248 forks source link

No module named 'pkg_resources' #325

Open BabakAmini opened 6 months ago

BabakAmini commented 6 months ago

Things to check first

Sqlacodegen version

2.3.0.post1

SQLAlchemy version

2.0.30

RDBMS vendor

PostgreSQL

What happened?

Running sqlacodegen with or without arguments results in the error ModuleNotFoundError: No module named 'pkg_resources'. This occurs when using pip install sqlacodegen, which installs version 2.3.0.post1 from PyPi. If you install the most recent version from GitHub, there will not be any issues.

Database schema for reproducing the bug

No response

scotscotmcc commented 5 months ago

I just ran into this as well. on pypi.org for the project, you can go to 'release history' and it lists a number of newer versions as 'pre-release' (up to 3.0.0rc5 right now). you can install this from pypi with pip install sqlacodegen==3.0.0rc5

agronholm commented 5 months ago

Or with just pip install --pre sqlacodegen.