Gen install

“pkg> add https://github.com/probcomp/Gen

“ERROR: syntax: extra token “https” after end of expression.”

Can you help me?

Thanks.

Try

pkg> add https://github.com/probcomp/Gen.git

If the package is not registered and you add by cloning you need to use quotes:

pkg> add "https://github.com/probcomp/Gen"

No, only if the url has weird characters, like spaces or similar. This works for me:

(v1) pkg> add https://github.com/probcomp/Gen
  Updating git-repo `https://github.com/probcomp/Gen`
 Resolving package versions...
  Updating `~/.julia/environments/v1/Project.toml`
  [ea4f424c] + Gen v0.3.1 #master (https://github.com/probcomp/Gen)

That error is a Julia syntax error (not an error from the package manager) so it looks like you did something like this:

julia> add https://github.com/probcomp/Gen
ERROR: syntax: extra token "https" after end of expression

instead of first entering the Pkg REPL mode (you enter it with ]). Note that the prompt changes from julia> to pkg> when you do this.

4 Likes

You have written pkg> in front of your command. Instead, press the ] character, which will take you to the Pkg-mode

Edit: It should look something like that
pkg%20mode

3 Likes

?

@fredrikekre was right, you don’t need to quote unless there are special characters.
First press ]. Then add https://github.com/probcomp/Gen.

Alternatively,

using Pkg
Pkg.add(PackageSpec(url = "https://github.com/probcomp/Gen"))

Again, you are not pressing ]

1 Like

[
thank you very much.

Is it possible to install Gen on JuliaBox? I’m getting errors. I’m not sure it is possible to enter the pkg REPL in Jupyter so I’m trying some other approaches.

using Pkg
pkg"add https://github.com/probcomp/Gen"

GitError(Code:ENOTFOUND, Class:Repository, could not find repository from ‘/mnt/juliabox/.julia/clones/2723206085777595909’)


Pkg.add(PackageSpec(url = "https://github.com/probcomp/Gen"))

GitError(Code:ENOTFOUND, Class:Repository, could not find repository from ‘/mnt/juliabox/.julia/clones/2723206085777595909’)