Error message: The Julia launcher failed to load a configuration file

I wanted to run my julia code but after I did so (trying both from vs code and command prompt), I received an error message:
"Error: The Julia launcher failed to load a configuration file.

Caused by:
Could not create lockfile: Access is denied. (os error 5)."

Even when I have no code in the .jl file, the error still pops up. How can I fix that?

FYI: This is strictly speaking not a Julia error. This is a juliaup error.*

OS error 5 is some generic permission error and this might help on Windows:
https://answers.microsoft.com/en-us/windows/forum/all/how-to-fix-error-5-access-is-denied-in-windows-10/8a4069ea-4b0e-4517-9d7a-62c44b4d6e7d

This triggers the error:

“The Julia launcher” is I think synonymous with juliaup. When you use juliaup, you run “julia” but you are actually running juliaup, and it for you julia (but you can also still just use julia, without juliaup, and it’s still supported too).

I’m not saying avoid juliaup (just fix that problem, somhow, it’s not a bug in julia either, seemingly just a permission problem), though you might want to run julia without juliaup, as a workaround.

Yes, Juliaup is the preferred update mechanism (others are available, were more popular in the past), is officially recommended, and shouldn’t (need to) be avoided.

1 Like

I tried the thing from the first link and it didn’t seem to help. I also tried running as an administrator but this didn’t help either.

Nevermind. I installed it manually, not from the microsoft store but via the installer and its fine rn. Thanks.