Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

MacOS brew update of Python breaks leanproject #94

Closed
arademaker opened this issue Feb 12, 2021 · 7 comments
Closed

MacOS brew update of Python breaks leanproject #94

arademaker opened this issue Feb 12, 2021 · 7 comments

Comments

@arademaker
Copy link

Whenever I update the Python with Homebrew, leanproject breaks

zsh: /Users/ar/.local/bin/leanproject: bad interpreter: /Users/ar/.local/pipx/venvs/mathlibtools/bin/python: no such file or directory

Any idea? So far, I am removing the pipx and reinstalling mathlibtools!

@arademaker
Copy link
Author

Another solution I found recently was to manually fix the link created in

/Users/ar/.local/pipx/venvs/mathlibtools/bin

instead of

python3.9 -> /usr/local/Cellar/python@3.9/3.9.1_7/bin/python3.9

I made it

python3.9 -> /usr/local/bin/python3.9

@Julian
Copy link
Contributor

Julian commented Mar 10, 2021

This is somewhat "known" bad behavior on Homebrew's part unfortunately. It's why some people in the Python community recommend against using Homebrew's Python. I'm not typically one of them, I use Homebrew's Python myself, but I'm more tempted to agree if you're not doing Python development full time...

@Julian
Copy link
Contributor

Julian commented Mar 10, 2021

FWIW I think a better solution for leanproject will be shipping it as a shiv or zipapp for most users (in which case there's nothing to do, you just download the shiv)... which I meant to POC for y'all at some point but still haven't managed to find some spare time.

@Julian
Copy link
Contributor

Julian commented Aug 6, 2021

We likely should close this now I think -- despite the above, if you install leanproject via brew install mathlibtools rather than directly via pipx (as `install_macos.sh now does), this issue should no longer exist.

(CC @PatrickMassot)

@arademaker
Copy link
Author

Do we have a documentation about this alternative way to install the tools?

@Julian
Copy link
Contributor

Julian commented Aug 6, 2021

The install_macos.sh script will now do so automatically -- but docs for migrating from the old setup probably is a good idea -- it's essentially going to be pipx uninstall mathlibtools && brew install mathlibtools to move over I believe. If you try that out when you get a minute perhaps and let me know if that works I'm happy to put that command somewhere in the install info if that's helpful.

@bryangingechen
Copy link
Contributor

The updated docs are now here. Please post on Zulip or create an issue at our website repo if something is still unclear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants