Zulip Chat Archive

Stream: lean4

Topic: help with 'mathematics in lean'


LizBonn (Oct 04 2023 at 08:35):

Hi, I'm new to lean and trying to fetch 'mathematics in lean' repository on my PC. I followed this instruction and reach Step 5, but then I meet something wrong when running command 'lake exe cache get'. The errors are below. Could anyone help with this case?
Thanks in advance.
Errors.png

LizBonn (Oct 04 2023 at 08:46):

When I first ran this command, it really worked and showed info 'downloading component 'lean' '. After a while the info became 'installing component 'lean' ', but then such errors came out. I have no idea what happened. :-(

Mauricio Collares (Oct 04 2023 at 09:17):

What does git status say?

LizBonn (Oct 04 2023 at 09:31):

git-status.jpg

LizBonn (Oct 04 2023 at 09:31):

It shows like this.

Alex J. Best (Oct 04 2023 at 09:33):

How did you install Lean? What does lean -v say?

LizBonn (Oct 04 2023 at 09:37):

I installed lean following this.
This is what 'lean -v' shows.
leanv.png

Alex J. Best (Oct 04 2023 at 09:40):

That looks good. What happens if you type lake build?

LizBonn (Oct 04 2023 at 09:41):

btw, there's also something wrong with my vscode. I cannot start the lean server. When I try to open a .lean file, it reminds me that 'The lean4 server crashed...'.
vscodeproblem.jpg

LizBonn (Oct 04 2023 at 09:42):

'lake build' actually results in the same errors as above...

Ruben Van de Velde (Oct 04 2023 at 09:42):

What happens if you "go to output"?

LizBonn (Oct 04 2023 at 09:44):

This is the output, some similar error messages.
ouput.jpg

Sebastian Ullrich (Oct 04 2023 at 09:55):

Something seems to be seriously wrong with your installation of Lean. Try removing all of ~/.elan and then reinstalling it

LizBonn (Oct 04 2023 at 09:58):

ok, I'll have a try.

Alex J. Best (Oct 04 2023 at 10:02):

It looks like people had similar issues before maybe due to non ascii characters in their username, is that the case for your setups?

Sebastian Ullrich (Oct 04 2023 at 10:08):

Oh! If lake build fails but lean lakefile.lean works, that would more or less confirm that.

LizBonn (Oct 04 2023 at 10:12):

There's truly non ascii characters in my username. I don't know if it influences this...

LizBonn (Oct 04 2023 at 10:14):

Unluckily, the latter one doesn't work either :-(

Yaël Dillies (Oct 04 2023 at 10:18):

LizBonn said:

There's truly non ascii characters in my username. I don't know if it influences this...

I had the same problem with my ë. I resorted to fully reinstall my computer and change my username to Yael. It fixed it.

Sebastian Ullrich (Oct 04 2023 at 11:21):

I would have loved to hear about this issue earlier!

MohanadAhmed (Oct 04 2023 at 20:44):

Hello @LizBonn
I notice from the screenshots you are using windows. Before going with the drastic option of reinstalling your computer perhaps you can try the TryLean4Bundle located at https://github.com/MohanadAhmed/TryLean4Bundle/releases/tag/latest
The steps are very simple:

  1. Download the exe from the link above.
  2. Run the exe for it to unpack. It will create a folder called TryLean4Bundle.
  3. Inside the TryLean4Bundle you will find a file called RunLean.bat. Double click on it and it will open the mathematics_in_lean folder in VSCodium directly.

MohanadAhmed (Oct 04 2023 at 20:49):

If non-ascii characters are the source of the problem you can put the bundle in a folder out of your user account for example in C:\MyLeanStuff or other location.

Sebastian Ullrich (Oct 07 2023 at 09:22):

Yaël Dillies said:

LizBonn said:

There's truly non ascii characters in my username. I don't know if it influences this...

I had the same problem with my ë. I resorted to fully reinstall my computer and change my username to Yael. It fixed it.

Fixed in lean4#2633, for people called aü¤ and likely others as well

Eric Wieser (Oct 07 2023 at 09:42):

I'm very confused by that PR, the windows documentation says that the alternative to (wide) unicode is ASCII, which also sounds wrong

Eric Wieser (Oct 07 2023 at 09:44):

https://stackoverflow.com/a/8831181/102441 suggests that we should be using the W API, then converting to utf8

Eric Wieser (Oct 07 2023 at 09:45):

Ah, the answer below says that it's fine after all!


Last updated: Dec 20 2023 at 11:08 UTC