Zulip Chat Archive

Stream: new members

Topic: install lean3 on windows


Shufan Xia (Feb 06 2024 at 22:00):

Hello community, new to Lean, want to install and run lean3 on a windows machine. I followed the steps from this link https://leanprover-community.github.io/lean3/install/windows.html , but could not get it work in my VS code. The VS output window says "Watchdog error: Cannot read LSP request: A Lean 3 request was received. Please ensure that your editor has a Lean 4 compatible extension installed." I understand lean3 is obsolete but still need it. Could someone help me with getting lean3 running? Thanks a lot.
image.png

Ruben Van de Velde (Feb 06 2024 at 22:03):

Do you have a particular reason to install lean 3 rather than 4? 3 is no longer supported

Matt Diamond (Feb 06 2024 at 22:05):

assuming you actually need Lean 3, it's possible that you installed the wrong extension on VSCode

Matt Diamond (Feb 06 2024 at 22:06):

or maybe the mismatch is the other way around, where the extension is Lean 3 but for some reason your project is Lean 4... do you have Lean 4 installed as well?

Matt Diamond (Feb 06 2024 at 22:08):

actually I see this in your screenshot, which suggests it's just the wrong extension:
image.png

Shufan Xia (Feb 06 2024 at 22:08):

Ruben Van de Velde said:

Do you have a particular reason to install lean 3 rather than 4? 3 is no longer supported

want to try this https://github.com/jesse-michael-han/lean-gptf/tree/master. The author says it only supports lean3

Shufan Xia (Feb 06 2024 at 22:09):

Matt Diamond said:

actually I see this in your screenshot, which suggests it's just the wrong extension:
image.png

I don't have lean4 installed yet.
image.png
image.png

Shufan Xia (Feb 06 2024 at 22:10):

Matt Diamond said:

or maybe the mismatch is the other way around, where the extension is Lean 3 but for some reason your project is Lean 4... do you have Lean 4 installed as well?

how do I set which lean version being used for a project?

Matt Diamond (Feb 06 2024 at 22:10):

I see. Did you try creating a new Lean 3 project and opening the folder for that project in VSCode? I see you've opened a single file in your Documents folder but I believe you need to create a project.

Patrick Massot (Feb 06 2024 at 22:23):

Shufan Xia said:

want to try this https://github.com/jesse-michael-han/lean-gptf/tree/master. The author says it only supports lean3

I think this experiment is fully dead. Even if you manage to install the corresponding obsolete version of Lean then it will try to talk to a server that has been shut down a long time ago.

Shufan Xia (Feb 06 2024 at 22:25):

Matt Diamond said:

I see. Did you try creating a new Lean 3 project and opening the folder for that project in VSCode? I see you've opened a single file in your Documents folder but I believe you need to create a project.

that makes sense. Tried to follow the instruction on 'creating a lean project' from here https://leanprover-community.github.io/lean3/install/project.html. Got "bash: leanproject: command not found". I did try this already " type source ~/.profile or source ~/.bash_profile.". How could I make my git bash recognize lean command? Thanks again

Patrick Massot (Feb 06 2024 at 22:25):

Modern incarnations of this idea can be found at https://github.com/lean-dojo/LeanCopilot and https://github.com/wellecks/llmstep.

Patrick Massot (Feb 06 2024 at 22:26):

I should also say that it is very unlikely you will benefit from those IA tools if you never used Lean in the regular way.

Shufan Xia (Feb 06 2024 at 22:27):

Patrick Massot said:

Modern incarnations of this idea can be found at https://github.com/lean-dojo/LeanCopilot and https://github.com/wellecks/llmstep.

Thank you for this helpful recommendation.

Patrick Massot (Feb 06 2024 at 22:27):

So you should probably install Lean 4 and follow some tutorial to learn the basics and then turn to either LeanCopilot or LLMStep.

Patrick Massot (Feb 06 2024 at 22:28):

There are instructions on https://leanprover-community.github.io/. Also note there is a Zulip stream devoted to AI and Lean at https://leanprover.zulipchat.com/#narrow/stream/219941-Machine-Learning-for-Theorem-Proving

Shufan Xia (Feb 06 2024 at 22:28):

I see. Thank you for your advice. Will give it a try.


Last updated: May 02 2025 at 03:31 UTC