Photo by Ganapathy Kumar on Unsplash
I’m using macOS11(beta), BigSur.
I think BigSur is cool but, I have faced many issues that I haven’t had bef...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks!!
Does
pyenv install 3.9.0
work for you, then? I've followed all your steps and still get:For me, the problem was that I needed to have
zlib
(and possiblyopenssl@.1.1
andreadline
) installed from homebrew, and then having the following environment variable set.I also had the following set, though I'm not sure if they're required.
Hopefully this helps!
I'm having this same issue after re-installing pyenv (no issues prior to re-installing, but this is the first time I've needed to re-install after upgrading to Big Sur, so I think it's related). Trying your solution now.
Edit: Just reporting back — this worked for me. Thank you very much.
Others who come across this might also want to install and link bzip2 prior to compiling.
I.e.,
This is a snippet I use on all my machines, if you don't always use brew you could always wrap it in an outer check. And yes the -O2 might not be for everybody, then just skip it :)
This one will adhere to whatever location you might have used for Linux Homebrew, on Darwin you would always use /usr/local, since otherwise a lot of brew stuff fails, and it would be a pointless pain to workaround.
comment: Darwin doesn't set this variable, Linux HomeBrew does
if [ "$HOMEBREW_PREFIX" = "" ]; then
HOMEBREW_PREFIX="/usr/local"
fi
comment: Set the env to ensure brew can build stuff
export LDFLAGS="-L$HOMEBREW_PREFIX/opt/zlib/lib -L$HOMEBREW_PREFIX/opt/bzip2/lib"
export CPPFLAGS="-I$HOMEBREW_PREFIX/opt/zlib/include -I$HOMEBREW_PREFIX/opt/bzip2/include"
export CFLAGS="-O2"
Thank you, this worked!
pyenv install 3.9.0
won't work since there is no 3.9.0.only 3.9.0b5, 3.9-dev
I'm still stuck with the same problem(( M1 mac
What is your issue?
Installing pyenv or install python via pyenv?
awesome You are here).
I saw some major versions don't work on M1.
Maybe you can try to install python 3.9.1
I have 3.9.1
but the project on 3.6.9.
and during pyenv install occurs errors with my python.
and I should use 3.6.9
and couldn't solve this issue.
Did you try the following?
$ CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.9.1 < <(curl -sSL github.com/python/cpython/commit/8... install miniforge3-4.9.2full_index=1)
Yes I trying.
answer
pyenv: /Users/ruslanskira/.pyenv/versions/3.9.1 already exists )))
but for 3.6.9
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.
BUILD FAILED (OS X 11.2.1 using python-build 20180424)
what I found
github.com/pyenv/pyenv/issues/1643
it is open issue.
Please check this out. Actually I can install 3.6.9 on BigSur.
dev.to/kojikanao/install-python-3-...
Is
brew readline xz
supposed to bebrew install readline xz
? Still having trouble downgrading to 3.8.0 for Tensorflow compatibility. Am stuck on 3.9.1 currently.Good catch, thank you!
You mean you haven't installed 3.8.0?
Are you using an M1 Mac?
Hey thank you for writing and sharing this. This worked for me (installed 3.7.3)