Zulip Chat Archive

Stream: general

Topic: How to update lean3?


Thorsten Altenkirch (Nov 01 2022 at 13:46):

How do I update my lean 3 installation? I guess I need to use elan?

Julian Berman (Nov 01 2022 at 14:03):

That's the most common way to do so for users yeah -- but if you're using it you don't need to physically do anything typically if/once it's installed. If you're in a directory with a leanpkg.toml file, that declares what version of Lean is supposed to be used, and elan will automatically use that version (whether it's newer or older or whatever)

Julian Berman (Nov 01 2022 at 14:03):

(Or in Lean 4 it's a similar newer version of that file)

Kevin Buzzard (Nov 01 2022 at 15:59):

If you're working inside a lean 3 project and using leanproject to manage it then it should be as simple as leanproject up.

Eric Wieser (Nov 01 2022 at 21:41):

It's pretty rare that you want to manually upgrade lean3; usually you just want to upgrade mathlib and take the lean version it asks for

Thorsten Altenkirch (Nov 03 2022 at 10:48):

Thank you. I am currently not using mathlib to simplify the installation for the students. I need to update because I have incompatible versions on my laptop and my desktop. I am still not sure how to do this.

Mario Carneiro (Nov 03 2022 at 10:57):

What Kevin said - if you have a lean project not depending on mathlib then leanproject up should do the trick

Kevin Buzzard (Nov 03 2022 at 23:04):

If you do not even have leanproject installed then you can manually edit the leanpkg.toml file in your project I guess...

Thorsten Altenkirch (Nov 07 2022 at 11:37):

I have actually a globally installed lean project. But I get:

(base) psztxa@IMAC-DGKYNHM5JV3X L11 % leanproject up
info: downloading component 'lean'
error: binary package was not provided for 'darwin'
Command '['leanpkg', 'upgrade']' returned non-zero exit status 1.

Yaël Dillies (Nov 07 2022 at 11:38):

That's an elan error. Run elan self update.

Thorsten Altenkirch (Nov 07 2022 at 11:39):

(base) psztxa@IMAC-DGKYNHM5JV3X L11 % elan self update
info: checking for self-updates
error: failed to parse latest release tag

Eric Wieser (Nov 07 2022 at 12:01):

I think you might need to reinstall elan

Thorsten Altenkirch (Nov 07 2022 at 14:04):

Will do that.

Thorsten Altenkirch (Nov 15 2022 at 11:04):

Tried and failed!

Whenever I try to install lean I get:
info: downloading component 'lean'
error: binary package was not provided for 'darwin'

and when I run base) elan self update
info: checking for self-updates
error: failed to parse latest release tag

Moritz Doll (Nov 15 2022 at 11:05):

is it possible that your elan is really old?

Thorsten Altenkirch (Nov 15 2022 at 11:05):

Yes, how do I get rid of it?

Thorsten Altenkirch (Nov 15 2022 at 11:05):

base) psztxa@IMAC-DGKYNHM5JV3X ~ % elan --version
elan 0.10.2 (ba19fb7c9 2020-05-11)

Moritz Doll (Nov 15 2022 at 11:06):

https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/binary.20package.20was.20not.20provided.20for.20'windows'

Moritz Doll (Nov 15 2022 at 11:06):

oh dear..

Thorsten Altenkirch (Nov 15 2022 at 11:06):

I am on mac

Thorsten Altenkirch (Nov 15 2022 at 11:06):

and your link doesn't work

Moritz Doll (Nov 15 2022 at 11:07):

oh that is an issue with zulip, because the parser skrewed it up

Moritz Doll (Nov 15 2022 at 11:07):

short story seems to be elan self uninstall

Thorsten Altenkirch (Nov 15 2022 at 12:58):

Thank you - this did the trick!


Last updated: Dec 20 2023 at 11:08 UTC