sqlalchemy: For MacOS with M1 chipset greenlet is not properly installing as sub-dependency

Describe the bug

If we take a look into master of sqlalchemy it defines following install_requires:

greenlet != 0.4.17;(platform_machine=='aarch64' or (platform_machine=='ppc64le' or (platform_machine=='x86_64' or (platform_machine=='amd64' or (platform_machine=='AMD64' or (platform_machine=='win32' or platform_machine=='WIN32'))))))

Thus because platform_machine is not one of the above, greenlet is never installed. I was told that platform_machine for such macos is arm64 (I do not have Mac M1 at hand)

This in effect prevents sqlalchemy from running.

Fix is easy by pip install greenlet and then everything is back to normal.

To Reproduce


$ pip install sqlalchemy[asyncio]

$ pip show

    SQLAlchemy==1.4.35

While it should be:

$ pip show

    greenlet==1.1.2
    SQLAlchemy==1.4.35

Error

N/A

Versions

  • OS: MacOS
  • Python: Python3.9+
  • SQLAlchemy: SQLAlchemy = {version = “^1.4.35”, extras = [“asyncio”]}
  • Database: Postgres
  • DBAPI (eg: psycopg, cx_oracle, mysqlclient): postgresql+asyncpg

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@zzzeek Honestly I think you did a great job with those changes to docs, it’s hard to miss at this stage and the explanation is superb as always.

Maybe it warrants adding to FAQ of sqlalchemy to prevent you from being bothered with duplicated issues. 😉

I’d much prefer greenlet provide an M1 wheel file. Anyone who reads the docs for SQLAlchemy asyncio should see this right at the top here. However, doc writing these days is much more difficult as you can’t just write docs, you have to add colors and fonts and flashing lights to get people to see things, so maybe will be doing that here. the FAQ is another such place but we’ve moved the FAQ down on the doc index and I bet people dont realize we have an FAQ now. We have a lot of important docs and I am still trying to figure out how to get people to read them. but when you have 1M downloads a day I think it’s unavoidable docs will be missed by some subset of users.