I ran into an issue where I couldn't install contents from my lockfile when the lockfile was generated on an M1 machine from the dependencies listed in requirements.txt in the server base repo.
The error message has been documented in this issue from pip https://github.com/pypa/pip/issues/9644 but the workarounds listed there do not fix the issue in this instance.
I had to fix the issue by adding greenlet==2.0.1 into my requriments.txt file before generating the lockfile. After doing that everything worked as it should.
Had a discussion with @finnure about this and based on some rudimentary tests with an Intel Mac and an M1 mac, it turns out that the M1 mac is for some reason not pinning greenlet in the lockfile, while the Intel mac has it, but that was the only difference between a lockfile generated on Intel vs M1.
What went wrong?
I ran into an issue where I couldn't install contents from my lockfile when the lockfile was generated on an M1 machine from the dependencies listed in requirements.txt in the server base repo.
The error message has been documented in this issue from pip https://github.com/pypa/pip/issues/9644 but the workarounds listed there do not fix the issue in this instance.
The error message will point to this line in sqlalchemy where it sets up depedency constraints for the package greenlet https://github.com/sqlalchemy/sqlalchemy/blob/main/setup.cfg#L40
How to fix it
I had to fix the issue by adding
greenlet==2.0.1
into my requriments.txt file before generating the lockfile. After doing that everything worked as it should.Had a discussion with @finnure about this and based on some rudimentary tests with an Intel Mac and an M1 mac, it turns out that the M1 mac is for some reason not pinning greenlet in the lockfile, while the Intel mac has it, but that was the only difference between a lockfile generated on Intel vs M1.