Zulip Chat Archive

Stream: new members

Topic: Failing copilot install


Noam Kantor (Jan 22 2024 at 17:25):

Hi there, I am trying to play around with Lean Copilot but keep getting the following error after following the github page's instructions:

`/Users/noamkantor/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/lake setup-file /Users/noamkantor/Lean4 Projects/RegStructTest/RegStructTest/Basic.lean Init LeanCopilot Mathlib.Algebra.Module.Basic [...more packages...] Mathlib.Order.CompleteLattice` failed:

stderr:
error: 'LeanCopilot'  'LeanCopilot.Frontend'  'Std.Control.Nondet.Basic': no such file or directory (error code: 2)
  file: ./.lake/packages/std/././Std/Control/Nondet/Basic.lean

Any idea of what I may need to do to fix this?

Noam Kantor (Jan 22 2024 at 17:28):

Hmm, is it possible I ran out of space while installing or tried to install it too many times? Now I'm getting errors like

error: stderr:
error: unable to open output file './.lake/packages/std/.lake/build/ir/Std/Data/HashMap/WF.c.o': 'No space left on device'
1 error generated.
error: external command /Users/noamkantor/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/leanc exited with code 1
error: external command /Users/noamkantor/.elan/toolchains/leanprover--lean4---v4.5.0-rc1/bin/leanc exited with code 1

Noam Kantor (Jan 22 2024 at 18:30):

@Kaiyu Yang I figure you may be the best person to ask about this! Thanks in advance.

Julian Berman (Jan 22 2024 at 18:32):

I have no idea about Lean Copilot in particular, but try running df -h to see whether you're indeed out of disk space, and then perhaps consider rm -rf .lake to start over.

Noam Kantor (Jan 22 2024 at 19:02):

Thanks, yes it does look like it's completely full.

Noam Kantor (Jan 22 2024 at 19:02):

Which files / packages do I need to reinstall if I run the deletion? Just mathlib and copilot? Or lake itself?

Noam Kantor (Jan 22 2024 at 19:05):

And will it remove the projects I'm working on?

Julian Berman (Jan 22 2024 at 19:09):

Did .lake really fill up your entire drive? Or was it near-full before? You can answer that by seeing how large .lake is -- try du -sh .lake

Julian Berman (Jan 22 2024 at 19:10):

If you run rm -r .lake in that copilot directory (which is where I assume you're running all the commands from) it should do nothing destructive, it should just remove the things it did to compile Copilot (which you should get back again as soon as you run lake build again)

Julian Berman (Jan 22 2024 at 19:11):

But let me at least glance at the Lean Copilot install instructions before attempting to help you so I see what it's telling you to do.

Julian Berman (Jan 22 2024 at 19:12):

Are you installing Lean Copilot into a project of your own?

Julian Berman (Jan 22 2024 at 19:12):

And following https://github.com/lean-dojo/LeanCopilot#adding-lean-copilot-as-a-dependency then?

Noam Kantor (Jan 22 2024 at 19:12):

I am, yes. Looks like my computer was close to full before: 3.7G .lake

Julian Berman (Jan 22 2024 at 19:13):

That's "relatively" small

Julian Berman (Jan 22 2024 at 19:13):

So if your drive is almost full (has say, less than 20GB of free space) I'd address that first

Julian Berman (Jan 22 2024 at 19:13):

(By deleting large files you don't need, perhaps)

Noam Kantor (Jan 22 2024 at 19:13):

Yup, that's what I was using. So is the likely conclusion that I ran out of space and thus can't download the rest of the necessary package?

Julian Berman (Jan 22 2024 at 19:14):

It's hard to say because I don't think I see the "real error" in what you pasted at the beginning.

Julian Berman (Jan 22 2024 at 19:14):

I'd say it's not unlikely though.

Noam Kantor (Jan 22 2024 at 19:15):

Got it. Thanks so much, Julian - I'll report back if this doesn't fix it.

Julian Berman (Jan 22 2024 at 19:16):

My pleasure, yeah feel free to ask if you run into trouble.

Noam Kantor (Jan 22 2024 at 22:58):

I now have plenty of room on my computer and I'm getting a similar error in response to lake build LeanCopilot:

warning: manifest out of date: git revision of dependency 'mathlib' changed; use `lake update mathlib` to update it
[16/138] Compiling Std.Util.ExtendedBinder
[17/208] Compiling Std.Tactic.HaveI
[17/209] Compiling Std.Tactic.OpenPrivate
[17/208] Compiling Std.Data.Option.Init.Lemmas
error: 'LeanCopilot.Frontend'  'Std.Control.Nondet.Basic': no such file or directory (error code: 2)
  file: ./.lake/packages/std/././Std/Control/Nondet/Basic.lean
[18/279] Compiling Std.Tactic.Unreachable
[19/279] Compiling Std.Lean.Command

Noam Kantor (Jan 22 2024 at 22:59):

I assume I should not run lake update mathlib because of the recent cache issues, so I've ignored that. I can build the rest of the package but keep getting the error about those two files not existing.

Kaiyu Yang (Jan 23 2024 at 00:22):

This looks like a conflict between Std versions used by Lean Copilot and other libraries such as mathlib. It's hard to say what's going on without fully reproducing the error. Can you open an issue in LeanCopilot's repo with detailed steps for reproducing the error?

Noam Kantor (Jan 23 2024 at 02:06):

It looks like I needed to manually rebuild the packages I had imported and that the Std bits had not been built yet. It seems to be working now, though I'll let you know if that changes!

Esteban Estupinan (Apr 01 2024 at 13:50):

Hi all, I managed to install lean copilot with a lot of effort on windows wsl, apparently there are no errors when importing leanCopilot in the.lean file. The problem arises when I execute a command like "suggest_tactics", after a few seconds I get the following error. Maybe someone has already experienced this or knows how to fix this error?

import LeanCopilot

theorem hello_world (a b c : Nat)
  : a + b + c = a + c + b := by
  suggest_tactics

imagen.png

Kaiyu Yang (Apr 01 2024 at 14:08):

Maybe move to https://leanprover.zulipchat.com/#narrow/stream/219941-Machine-Learning-for-Theorem-Proving/topic/LeanCopilot?


Last updated: May 02 2025 at 03:31 UTC