I want to install the following package from github. I tried using the following command in my environment to install
(nlpEnvJl) pkg> add "https://github.com/yeesian/LeafletJS.jl/tree/master/src"
But I get the following error,
ERROR: could not find project file in package at https://github.com/yeesian/LeafletJS.jl
maybe subdir
needs to be specified
Any ideas on how I can get installed? Do I have to clone it first to my local repo? If so how do I install from local path?
Cheers Thanks in advance
To install packages, use Pkg , Julia's built-in package manager, to add packages to your active environment. To use packages already in your active environment, write import X or using X , as described in the Modules documentation.
Julia uses Git as a repository for itself and for its package and that the installation has a built-in package manager called pkg. jl.
You do not need to install locally, but you have to put the URL official to clone it.
add https://github.com/yeesian/LeafletJS.jl.git
Sometimes, if the package is already registered and you only want the master version in github you can directly do
add PackageName#master
You have to clone it locally and then use Pkg.generate
in order to import it as a package. It needs a Project.toml
file to be added.
Thus, you have to:
$ git clone [email protected]:yeesian/LeafletJS.jl.git
Cloning into 'LeafletJS.jl'...
remote: Enumerating objects: 59, done.
remote: Total 59 (delta 0), reused 0 (delta 0), pack-reused 59
Receiving objects: 100% (59/59), 14.83 KiB | 197.00 KiB/s, done.
Resolving deltas: 100% (22/22), done.
$ julia
(@v1.5) pkg> generate LeafletJS
Generating project LeafletJS:
LeafletJS/Project.toml
LeafletJS/src/LeafletJS.jl
$ cp -r LeafletJS.jl/* LeafletJS/.
$ cd LeafletJS
LeafletJS $ julia
(@v1.5) pkg> dev .
[ Info: Resolving package identifier `.` as a directory at `/tmp/jl_temp/LeafletJS/`.
Path `.` exists and looks like the correct package. Using existing path.
Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
[b1ddfcb9] + LeafletJS v0.1.0 `../../../../../tmp/jl_temp/LeafletJS`
Updating `~/.julia/environments/v1.5/Manifest.toml`
[b1ddfcb9] + LeafletJS v0.1.0 `../../../../../tmp/jl_temp/LeafletJS`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With