Zulip Chat Archive

Stream: new members

Topic: issue about mathlib install


Wilber Du (Nov 03 2025 at 22:43):

I am trying to install the mathlib but I got this error message:

Cannot initialize project. Command output: info: downloading mathlib `lean-toolchain` file info: mathlib: no previous manifest, creating one from scratch info: leanprover-community/mathlib: cloning https://github.com/leanprover-community/mathlib4 info: leanprover-community/mathlib: checking out revision 'a79df06b3d23fb6a3c42fb65a949009dc241862d' info: toolchain not updated; already up-to-date error: dependency cycle detected: mathlib mathlib

Emily Riehl (Nov 03 2025 at 23:04):

This is for my class and I'm confused about the error message dependency cycle detected: mathlib mathlib. Everyone just installed VSCode and Lean and we're trying to create our first project using mathlib. Is this the right channel for installation help? I can't remember.

Mac Malone (Nov 03 2025 at 23:36):

This is quite odd. What does the lakefile.lean / lakefile.toml look like for this project?

One possible way I could see this happening is if the project was given the name mathlib and then required mathlib. For example:

lakefile.toml

name = "mathlib"

[[require]]
name = "mathlib"
scope = "leanprover-community"

Emily Riehl (Nov 03 2025 at 23:52):

Thanks. I think that was the issue.

Emily Riehl (Nov 03 2025 at 23:53):

Now we've got everyone set up! Phew :sweat_smile:

Wilber Du (Nov 03 2025 at 23:53):

Thank you so much! Everything works well now


Last updated: Dec 20 2025 at 21:32 UTC