Adding a local module

I am trying to run some open code from github

The package is not a registered one, so it is suggested to add the package from the local path. I have downloaded the package to my C disk, but cannot add it successfully,

(harmonic_oscillator_1d) pkg> add   C:\Users\jmzhang\Downloads\FermiFCI.jl-master\src\FermiFCI
ERROR: `C:\Users\jmzhang\Downloads\FermiFCI.jl-master\src\FermiFCI` appears to be a local path, but directory does not exist

what is the problem?

You don’t need to clone it, you can do

]add https://github.com/rammelmueller/FermiFCI.jl
1 Like
(@v1.10) pkg> add https://github.com/rammelmueller/FermiFCI.jl
     Cloning git-repo `https://github.com/rammelmueller/FermiFCI.jl`
ERROR: failed to clone from https://github.com/rammelmueller/FermiFCI.jl, error: GitError(Code:ERROR, Class:SSL, Your Julia is built with a SSL/TLS engine that libgit2 doesn't know how to configure to use a file or directory of certificate authority roots, but your environment specifies one via the SSL_CERT_FILE variable. If you believe your system's root certificates are safe to use, you can `export JULIA_SSL_CA_ROOTS_PATH=""` in your environment to use those instead.)

failed

Looking at your original error you have

add   C:\Users\jmzhang\Downloads\FermiFCI.jl-master\src\FermiFCI

but maybe you meant

add   C:\Users\jmzhang\Downloads\FermiFCI.jl-master\
(@v1.10) pkg> add   C:\Users\jmzhang\Downloads\FermiFCI.jl-master\
ERROR: Did not find a git repository at `C:\Users\jmzhang\Downloads\FermiFCI.jl-master\`, perhaps you meant `Pkg.develop`?

(@v1.10) pkg> add   C:\Users\jmzhang\Downloads\FermiFCI.jl-master\src\
ERROR: Did not find a git repository at `C:\Users\jmzhang\Downloads\FermiFCI.jl-master\src\`

Can you git clone?

Otherwise you will need to dev the package.

You can follow these steps:

  1. clone the repo in the shell, not downloading the zip on the GitHub website.
git clone https://github.com/rammelmueller/FermiFCI.jl
  1. add the package in the Julia REPL.
(jl_NFHhDT) pkg> dev /path/to/FermiFCI.jl

Then you can use the package directly.


Here are more details about adding a local package.

1 Like