-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Document and fix Python installation problems on Big Sur #22497
Comments
I've installed the Python 3.9 release candidate and it fails in the building of the wheels (as I recalled). I will determine which packages are having trouble. Here's the output of one of the failures (this one seems to think we're on mac 10.9; am I reading this right?):
|
I've been told that another engineer on Big Sur all they had to do is:
I will verify this. |
@taylangocmen Had similar output to that, I don't remember if we figured out why. |
With the OS' Python 3:
It fails to build a wheel for uwsgi
Having installed the Python 3.9 RC1 installation gets on the way (this shows that having multiple ways of installing Python can get on the way and each developer can end up on a different unique situation):
I had to unistall it from /Applications and I decided to use brew to get me Python and go from there:
Using the brewed Python version I got a lot further:
To resolve this running
Conclusion:
I need to test with Python 3.6 and see what the situation is for |
Before I started, the following comment I removed all packages installed via brew to start from a known state. I then installed PyenvInstall recommended build dependencies:
Build Python 3.6.10 with pyenv
This can be resolved by using CLAGS, LDFLAGS with --patch (step 1 from this comment is not necessary). I also had to
This set up seems to work. Brew installation
This set up seems to work. The platform for each Python installedpyenv, System & brew installed Python's platform:
|
I highly recommend focusing on getting pyenv to work, with a high tolerance for workarounds. Brew python's burned us in the past, especially when they removed 2.7, and you can't get patch version granularity. I'd also avoid system python, you absolutely are at the mercy of their version too and in general I don't mess around with system python because it's easy to break in silent + unexpected ways. With pyenv we have full control over versions and can easily upgrade people with the tooling revolving around |
Agreed with josh. |
Installing Python via pyenv on Big Sur for older Python versions requires: * Setting LDFLAGS for zlib (pyenv/pyenv#1711) * Patching the source code Once a new release of pyenv is released and we use a newer Python 3 version we will not need all these hacks and all Mac versions will be able to use the same code paths. Fixes #22497
Remove all brew dependencies:
Remove venv and pyenv:
Installing pyenv with For the curious:
Meanwhile, while I figure out the above:
|
Note: The PR is a hack until a new pyenv is released and we upgrade the Python version we use. |
Installing Python via pyenv on Big Sur for older Python versions requires: * Setting LDFLAGS for zlib (pyenv/pyenv#1711) * Patching the source code Once a new release of pyenv is released and we use a newer Python 3 version we will not need all these hacks and all Mac versions will be able to use the same code paths. Fixes #22497
I've discovered why I've updated the PR to install Python 2.7 as well. Here's the verification of the steps:
|
Installing Python via pyenv on Big Sur for older Python versions requires: * Setting LDFLAGS for zlib (pyenv/pyenv#1711) * Patching the source code Once a new release of pyenv is released and we use a newer Python 3 version we will not need all these hacks and all Mac versions will be able to use the same code paths. Fixes #22497
@armenzg librdkafka is indeed needed, you probably fixed it and it was installed from cache. In my case, pip 20.3.1 thinks a cached 10_6 wheel is sufficient. pypi doesn't yet have big sur wheels for confluent-kafka. To see this issue you have to force wheel compilation from remote sources:
So, for now, you should add |
Thanks to your tip I decided to run this I will investigate:
|
@armenzg You don't need to investigate that. Let pip prefer remote wheels.
Actually there isn't an 11 wheel here... does postgres work with this? Most tests involve postgres. |
Yeah so, I'd go ahead and take a guess that most 10_x wheels still work on Big Sur, so don't worry about this. |
I'm wondering if this would affect developers starting from a clean slate. |
|
There's currently no wheel for confluent-kafka, thus, we need librdkafka to build it. This can be removed once there's a wheel for it. Fixes #22497
There's currently no wheel for confluent-kafka, thus, we need librdkafka to build it from the source. This can be removed once there's a wheel for it. Fixes #22497 Co-authored-by: josh <[email protected]>
This issue is to track all known issues to doing development of Sentry on Big Sur (Mac's latest OS update). I will update the description of this issue as issues are documented and the associated workaround. If possible, I will look to file upstream issues where appropriate.
Known issues
make setup-pyenv
brew install librdkafka
seems to be necessary. See commentIf you don't use the Python version installed via
pyenv
as we recommend you might encounter this issue:psycopg2-binary
SYSTEM_VERSION_COMPAT=1 pip install psycopg2-binary
Upstream issues
The text was updated successfully, but these errors were encountered: