4 ms·
Use Homebrew to install pyenv and pyenv-virtualenv. Then use those to install pythons and collections of packages. You'll have stable development environments.
by 1123581321 6y ago
Use Homebrew to install pyenv and pyenv-virtualenv. Then use those to install pythons and collections of packages. You'll have stable development environments.
- systemvoltage 6y agoNot on M1 Apple Silicon. So many issues with pyenv on the M1. Brew python works fine natively.
- 1123581321 6y agoI have this setup running on M1 and Intel. I'm not saying you are having no issues, but I don't think that's the reason. If you're having trouble installing something with brew on M1, run arch x86_64 brew instead of brew to do a Rosetta installation.
- ArchOversight 6y agoMake sure that Xcode is installed, and available, then these instructions work a treat: https://github.com/pyenv/pyenv/issues/1643#issuecomment-729336054 https://github.com/pyenv/pyenv/issues/1643#issuecomment-7293... For installing Python on the M1 Apple Silicon. This will install x86_64 versions, but those will work just fine.
- easton 6y agoWhat? I did "pyenv install 3.9.1" on M1 and it worked absolutely fine, it built a arm64 build and everything. Maybe it's because I had Xcode installed?
- reaperhulk 6y agoMany of the problems people appear to be having with pyenv on M1 are related to it pulling include paths for homebrew that include homebrew libffi, but not passing the library path. For cases like cffi this results in header/library mismatch and you get runtime dynamic linker errors. Other replies here appear to assume basic compilation issues, but the issues I've seen on various GitHub projects are mostly related to these more insidious C toolchain challenges. They're not M1-specific, but they are manifesting on M1 machines.
- tclancy 6y agoAh, I was wondering why none of these things have happened to me. That said, the cascading upgrades does feel like a foot gun in search of feet.
- JackC 6y ago`brew install openssl` or `brew upgrade openssl` will still break pyenv virtualenvs, though they can then be fixed with `pyenv rehash`. Maybe this makes sense? I didn't sort through why it was happening.
- skrtskrt 6y agoI prefer pyenv-virtualenvwrapper but yes Still, Python 3.6.x installation is broken on Big Sur (non M1) My current Mac is going to be my last. Linux on Thinkpad is next
- ladzoppelin 6y agoI am far from an expert but this is what fixed Vscode's Python extension and enabled a "stable development environment"
- mark_l_watson 6y agoFeels strange doing this, but on M1 I am using the system Python 3, and installing packages as —user. This will cause me trouble sometime.