Zulip Chat Archive

Stream: new members

Topic: File not found in the search path


Alberto Alfarano (Dec 12 2022 at 12:24):

Hello,
I am a new member of the Zulip community and Lean overall!
I installed lean from https://leanprover-community.github.io/install/macos_details.html and Lean is working as expected when I do #eval 1+1.

Now I'm opening some files and from the first line I see some errors saying "file 'algebra/algebra/basic' not found in the search path
Use 'lean --path' to see where lean is looking, or https://leanprover-community.github.io/file-not-found.html for more".

I tried lean --path and I got

"/Users/albealfa/.elan/toolchains/leanprover-community--lean---3.49.1/bin/../library",
"/Users/albealfa/.elan/toolchains/leanprover-community--lean---3.49.1/bin/../lib/lean/library",
"/Users/albealfa/<my_lean_folder>/_target/deps/mathlib/src",
"/Users/albealfa/<my_lean_folder>/./src"

and all of these files exist.

Fyi, which lean gives "/Users/albealfa/.elan/toolchains/leanprover-community--lean---3.49.1/bin/lean"

Patrick Massot (Dec 12 2022 at 12:26):

Are you using VSCode?

Patrick Massot (Dec 12 2022 at 12:27):

If yes then you should make sure to use "Open folder" and not "open file"

Patrick Massot (Dec 12 2022 at 12:29):

The file explorer should look like
image.png

Alberto Alfarano (Dec 12 2022 at 12:52):

Hi Patrick, thanks this fixed some imports. But some other imports (like algebra.floor) are still not found.

Patrick Massot (Dec 12 2022 at 12:57):

You may then have a mismatch between mathlib versions.

Patrick Massot (Dec 12 2022 at 12:58):

If you just created a project then you are using a cutting edge mathlib. You can see what currently exist on https://leanprover-community.github.io/mathlib_docs/ and there is no file algebra.floor

Yaël Dillies (Dec 12 2022 at 13:01):

I renamed algebra.floor to algebra.order.floor several months ago.

Kevin Buzzard (Dec 12 2022 at 13:04):

Where are you seeing algebra.floor? If this is in someone else's project then you could just download their project with leanproject get <github userid>/<name of project instead of making a new project. Their project might use a different version of mathlib.


Last updated: Dec 20 2023 at 11:08 UTC