Error 'No such file or directory'

Hi,

This is my very first time using Julia. I tried to add the IJulia package but got this error message:

(v1.3) pkg> add IJulia
   Cloning default registries into `C:\Users\name\.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: SystemError: opening file "C:\\Users\\name\\.julia\\registries\\General\\Registry.toml": No such file or directory

Any help would be much appreciated :slight_smile:

As the error says, “C:\Users\name\.julia\registries\General\Registry.toml” file cannot be found.

As the directory “C:\Users\name\.julia\registries\General” is a git directory, you should just try git pull in that directory.

1 Like

Thanks! As I am really new to Julia, how would I go about doing that?

Hm, you shouldn’t need to be running git operations manually (and your machine probably doesn’t even have git installed). While you certainly can go down that road, it might be more productive to figure out what went wrong in the first place.

How are you using Julia? That is, did you install just Julia or did you download JuliaPro?

You can also try removing the folder C:\Users\name\.julia and trying again.

2 Likes

Thank you, I just tried to delete the folder but I’m still getting the same error message. Perhaps I’m deleting it wrong? (i was using the command prompt on windows).

I think I installed just Julia, not JuliaPro :confused:

It’s fine that you’re not using JuliaPro (it makes debugging this a bit simpler). How exactly did you install Julia, and what do you get when you run versioninfo() in Julia?

This is what I get when I run versioninfo():

julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-1035G4 CPU @ 1.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, cannonlake)

I can’t really remember how I installed Julia as it was a while ago unfortunately :frowning:

Ok, I’d suggest starting from a clean slate. Delete .julia, download Julia 1.4 from https://julialang.org/downloads/ and try again. If that still doesn’t work, then there is something particularly weird with your setup.

Are you on a corporate machine, by the way? I wonder if maybe you have some weird firewall or antivirus system that is causing problems.

Thanks for your advice! I tried it and it still didn’t work :((((
I’m just using a personal device so I guess something is really weird :confused:

It’s strange since it’s a personal device and you should be admin. I had similar issues in the past on a corporate computer and had to start Julia as admin. Also if you have Avast antivirus, make sure you disable it for a while, it likes to quarantine stuff (had problems with it when setting up Juno/Atom).
So my suggestions are:
Disable antivirus, delete again .julia folder, start Julia as admin and first try something simple such as ]update. This should just download registries and a few more stuff in .julia folder (created automatically).

1 Like

I had the same problem. Deleted Avast and now it is working. Thank you Lilian!

I came across the same issue initially
First, I would recommend you to add Julia to PATH on Windows 10/ mac. (I’ll attach a picture for more info or you can view it on the download page of Julia)

once you complete doing that go to [C drive] → [Users] -->[username ] → and there you’ll find the Julia folder. Delete the folder and then go to Julia terminal followed by the usual steps
( ] then … add IJulia )
This should resolve your problem. I faced the same issue and now after these steps, I was able to successfully install all the packages.