# Gen install

**URL:** <https://discourse.julialang.org/t/gen-install/26459>\
**Category:** Numerics\
**Created:** [July 17, 2019, 9:11am UTC](https://discourse.julialang.org/t/gen-install/26459 "2019-07-17T09:11:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadir.nar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kadir.nar/32/9374_2.png) [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Post date:** [July 17, 2019, 9:11am UTC](https://discourse.julialang.org/t/gen-install/26459/1 "2019-07-17T09:11:42Z")

</div>

“pkg\> add [GitHub - probcomp/Gen.jl: A general-purpose probabilistic programming system with programmable inference](https://github.com/probcomp/Gen)”

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

Can you help me?

Thanks.

---

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [July 17, 2019, 9:15am UTC](https://discourse.julialang.org/t/gen-install/26459/2 "2019-07-17T09:15:38Z")

</div>

Try

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

```

---

<div class="post-metadata">

**Author:** ![pmarg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pmarg/32/936_2.png) [@pmarg](https://discourse.julialang.org/u/pmarg)\
**Post date:** [July 17, 2019, 9:34am UTC](https://discourse.julialang.org/t/gen-install/26459/3 "2019-07-17T09:34:14Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [July 17, 2019, 9:45am UTC](https://discourse.julialang.org/t/gen-install/26459/4 "2019-07-17T09:45:10Z")

</div>

> [@pmarg](#):
>
> If the package is not registered and you add by cloning you need to use quotes:

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

```julia
(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)

```

> [@kadir.nar](#):
>
> “pkg\> add [https://github.com/probcomp/Gen](https://github.com/probcomp/Gen)”
> 
> “ERROR: syntax: extra token “https” after end of expression.”

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

```julia
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.

---

<div class="post-metadata">

**Author:** ![kadir.nar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kadir.nar/32/9374_2.png) [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Post date:** [July 17, 2019, 12:44pm UTC](https://discourse.julialang.org/t/gen-install/26459/5 "2019-07-17T12:44:27Z")

</div>

![1](https://global.discourse-cdn.com/julialang/original/3X/3/7/378403dac5136818f78d5d0132686fdc50323ac3.png)

---

<div class="post-metadata">

**Author:** ![kadir.nar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kadir.nar/32/9374_2.png) [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Post date:** [July 17, 2019, 12:45pm UTC](https://discourse.julialang.org/t/gen-install/26459/6 "2019-07-17T12:45:22Z")

</div>

> [@pmarg](#):
>
> ```julia
> pkg> add "https://github.com/probcomp/Gen"
> 
> ```

 ![2](https://global.discourse-cdn.com/julialang/original/3X/a/d/ad5da61f5bdb1048e99a89902cd2825ac0eee447.png)

---

<div class="post-metadata">

**Author:** ![Karajan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karajan/32/8545_2.png) [@Karajan](https://discourse.julialang.org/u/Karajan)\
**Post date:** [July 17, 2019, 12:46pm UTC](https://discourse.julialang.org/t/gen-install/26459/7 "2019-07-17T12:46:51Z")

</div>

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](https://global.discourse-cdn.com/julialang/original/3X/e/3/e3fbf4e2e60a35529ccee3dd2ebc41d4f7177149.jpeg)

---

<div class="post-metadata">

**Author:** ![kadir.nar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kadir.nar/32/9374_2.png) [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Post date:** [July 17, 2019, 12:52pm UTC](https://discourse.julialang.org/t/gen-install/26459/8 "2019-07-17T12:52:58Z")

</div>

![3](https://global.discourse-cdn.com/julialang/original/3X/4/6/4686484d9ea729e714e039a76859def5b85eee61.png)

?

---

<div class="post-metadata">

**Author:** ![pmarg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pmarg/32/936_2.png) [@pmarg](https://discourse.julialang.org/u/pmarg)\
**Post date:** [July 17, 2019, 12:58pm UTC](https://discourse.julialang.org/t/gen-install/26459/9 "2019-07-17T12:58:39Z")

</div>

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

Alternatively,

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

```

Again, you are not pressing ]

---

<div class="post-metadata">

**Author:** ![kadir.nar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kadir.nar/32/9374_2.png) [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Post date:** [July 17, 2019, 1:03pm UTC](https://discourse.julialang.org/t/gen-install/26459/10 "2019-07-17T13:03:22Z")

</div>

![555](https://global.discourse-cdn.com/julialang/original/3X/0/f/0fe73a4f07c343e754cbe3f0de665969cc9338c5.png)

[  
thank you very much.

---

<div class="post-metadata">

**Author:** ![Adam\_Black](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adam_black/32/12676_2.png) [@Adam\_Black](https://discourse.julialang.org/u/Adam_Black)\
**Post date:** [February 7, 2020, 4:21am UTC](https://discourse.julialang.org/t/gen-install/26459/11 "2020-02-07T04:21:16Z")

</div>

> [@pmarg](#):
>
> Pkg.add(PackageSpec(url = “[GitHub - probcomp/Gen.jl: A general-purpose probabilistic programming system with programmable inference](https://github.com/probcomp/Gen)”))

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.

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

```

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

```julia

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

```

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