# How to install non-registered dependencies in Julia 0.7/1.0

**URL:** <https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971>\
**Category:** General Usage\
**Created:** [August 23, 2018, 10:42pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971 "2018-08-23T22:42:47Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [August 25, 2018, 8:44pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/21 "2018-08-25T20:44:53Z")

</div>

It’s a bit confusing, but what I think he meant was that he `add`ed those dependencies to the environment/Project .tomls of MPIReco.jl.

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [August 25, 2018, 8:47pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/22 "2018-08-25T20:47:28Z")

</div>

In the LinearSolver Project.toml, I have

```julia
name = "LinearSolver"
uuid = "12d7aa1e-a7d4-11e8-33ea-6753c3e87491"

```

but Pkg says

```julia
 Info: Assigning UUID 1906c763-83da-50c9-aa61-18e2016498cc to LinearSolver

```

and if I correct the environment files after installing LinearSolver and MPIFiles, then MPIReco installs without trouble here.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:00pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/23 "2018-08-25T21:00:21Z")

</div>

That seems to fix this locally.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:07pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/24 "2018-08-25T21:07:57Z")

</div>

@Ralph_Smith:

if I remove MPIFiles and LinearSolver, I get

```julia
(v0.7) pkg> dev https://github.com/MagneticParticleImaging/MPIReco.jl.git
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/MagneticParticleImaging/MPIReco.jl.git`
[ Info: Assigning UUID cffeea2d-44ef-50d9-9a8a-3f5d8306ed6d to MPIReco
[ Info: Path `/Users/knopp/.julia/dev/MPIReco` exists and looks like the correct package, using existing path instead of cloning
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LinearSolver [1906c763]:
 LinearSolver [1906c763] log:
 ├─LinearSolver [1906c763] has no known versions!
 └─restricted to versions * by MPIReco [cffeea2d] — no versions left
   └─MPIReco [cffeea2d] log:
     ├─possible versions are: 0.0.0 or uninstalled
     └─MPIReco [cffeea2d] is fixed to version 0.0.0

```

Do I need to manually install MPIFiles and MPIReco?

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [August 25, 2018, 9:12pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/25 "2018-08-25T21:12:04Z")

</div>

That’s what I did, in order to set the git branches and checkout viable commits.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:13pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/26 "2018-08-25T21:13:45Z")

</div>

Yes but I want MPIReco to run tests on travis. It thus needs to install those packages and I thought it will do so since the information is located in the Manifest.

---

<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:** [August 25, 2018, 9:23pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/27 "2018-08-25T21:23:37Z")

</div>

I created [GitHub - fredrikekre/PackageB.jl](https://github.com/fredrikekre/PackageB.jl) which depends on (a specific branch from) [GitHub - fredrikekre/PackageA.jl](https://github.com/fredrikekre/PackageA.jl) and passes test: [Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/fredrikekre/PackageB.jl/builds/420601092#L457)

Adding locally you can do:

```julia
(v1) pkg> st
    Status `~/.julia/environments/v1.1/Project.toml`

(v1) pkg> add https://github.com/fredrikekre/PackageA.jl.git#somebranch
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [6efbc5e2] + PackageA v0.1.0 #somebranch (https://github.com/fredrikekre/PackageA.jl.git)
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [6efbc5e2] + PackageA v0.1.0 #somebranch (https://github.com/fredrikekre/PackageA.jl.git)

(v1) pkg> add https://github.com/fredrikekre/PackageB.jl.git
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [74f46274] + PackageB v0.1.0 #master (https://github.com/fredrikekre/PackageB.jl.git)
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [74f46274] + PackageB v0.1.0 #master (https://github.com/fredrikekre/PackageB.jl.git)

julia> using PackageB

julia> PackageB.greet()
Hello from PackageA.jl!

```

Hope this is useful.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:28pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/28 "2018-08-25T21:28:10Z")

</div>

Thanks. This means in principle this works.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:31pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/29 "2018-08-25T21:31:54Z")

</div>

> [@fredrikekre](#):
>
> Hope this is useful.

But locally you had to manually install PackageA right? Just installing B does not work here:

```julia
(v0.7) pkg> add https://github.com/fredrikekre/PackageB.jl.git
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Cloning git-repo `https://github.com/fredrikekre/PackageB.jl.git`
  Updating git-repo `https://github.com/fredrikekre/PackageB.jl.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PackageA [6efbc5e2]:
 PackageA [6efbc5e2] log:
 ├─PackageA [6efbc5e2] has no known versions!
 └─restricted to versions * by PackageB [74f46274] — no versions left
   └─PackageB [74f46274] log:
     ├─possible versions are: 0.1.0 or uninstalled
     └─PackageB [74f46274] is fixed to version 0.1.0

```

So how did you do this on travis?

---

<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:** [August 25, 2018, 9:38pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/30 "2018-08-25T21:38:46Z")

</div>

> [@tobias.knopp](#):
>
> But locally you had to manually install PackageA right?

Yea, but this is not new, you had to do this in Pkg2 too. (Edit: [Store some location info for deps in Project.toml · Issue #492 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/492) is probably the issue to track regarding this.)

> [@tobias.knopp](#):
>
> So how did you do this on travis?

On Travis we start julia with `PackageB/Project.toml` as the active project, and since I checked in `Manifest.toml` (which includes the url and branch of `PackageA`) then Pkg knows what `PackageA` means, and can instantiate it.  
This is equivalent to:

```julia
$ git clone https://github.com/fredrikekre/PackageB.jl.git PackageB
$ cd PackageB
$ julia --project

julia> using Pkg; Pkg.build(); Pkg.test()

```

The key thing here is that we are running inside `ProjectB`:

```julia
(PackageB) pkg> st
Project PackageB v0.1.0
    Status `Project.toml`
  [6efbc5e2] PackageA v0.1.0 #somebranch (https://github.com/fredrikekre/PackageA.jl.git)

```

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:46pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/31 "2018-08-25T21:46:16Z")

</div>

Oh well, this is so complicated. this means that the Manifest files are actually not used, just in this very specific case.

> [@fredrikekre](#):
>
> Yea, but this is not new, you had to do this in Pkg2 too. (Edit: [Store some location info for deps in Project.toml · Issue #492 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/492) is probably the issue to track regarding this.)

I know. In the first post you can see my workaround for this. And I am now seeking for a workaround for Julia 0.7.

---

<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:** [August 25, 2018, 9:49pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/32 "2018-08-25T21:49:51Z")

</div>

> [@tobias.knopp](#):
>
> I know. In the first post you can see my workaround for this. And I am now seeking for a workaround for Julia 0.7.

What do you mean? The workaround is to install the unregistered packages in order, which is what we did in Pkg2 also, so this has not changed really. Whats wrong with doing

```julia
(v1) pkg> add https://github.com/fredrikekre/PackageA.jl.git#somebranch
(v1) pkg> add https://github.com/fredrikekre/PackageB.jl.git

```

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 9:53pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/33 "2018-08-25T21:53:38Z")

</div>

I had a workaround that in Julia 0.6 that allowed to just add the leaf package (see my original post). And that particular workaround does not work anymore.

---

<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:** [August 25, 2018, 10:01pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/34 "2018-08-25T22:01:48Z")

</div>

Right, but `!isdir(Pkg.dir("LinearSolver"))` was not necessarily correct in Pkg anyway, if the user had packages in other places than the standard location.  
Just put in the README the commands to install the package. Copy-pasting

```julia
add https://github.com/fredrikekre/PackageA.jl.git#somebranch
add https://github.com/fredrikekre/PackageB.jl.git

```

is not really more work than copy-pasting

```julia
add https://github.com/fredrikekre/PackageB.jl.git

```

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 25, 2018, 10:07pm UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/35 "2018-08-25T22:07:19Z")

</div>

Its not just these two packages but in the end more than 10 packages. My workaround was nice since it kept the dependency local. I am looking forward to [https://github.com/JuliaLang/Pkg.jl/issues/492](https://github.com/JuliaLang/Pkg.jl/issues/492) which then will hopefully solve this issue.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 26, 2018, 11:12am UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/36 "2018-08-26T11:12:25Z")

</div>

I want to thank you @fredrikekre for your very good support and explanation. Travis now works: [Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/MagneticParticleImaging/MPIReco.jl/builds/420695597).

My impression is that the overall experience with unregistered packages is not good yet. This is not a complaint but totally expected for a brand new package manager. I hope that [https://github.com/JuliaLang/Pkg.jl/issues/492](https://github.com/JuliaLang/Pkg.jl/issues/492) will solve this issue which will then result in a better experience.

That travis runs the Manifest environment of the project is now a way to circumvent my problem but it does not feel correct. It means that things pass on travis but the do not work for the user. @keno: You argued in another thread that this is not desired.

---

<div class="post-metadata">

**Author:** ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)\
**Post date:** [August 26, 2018, 11:30am UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/37 "2018-08-26T11:30:51Z")

</div>

> [@tobias.knopp](#):
>
> @keno: You argued in another thread that this is not desired.

For registered packages that is.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [August 26, 2018, 11:33am UTC](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971/38 "2018-08-26T11:33:54Z")

</div>

And for unregistered packages hopefully it is also desired that a passing travis implies a passing local experience, no? I have strong hopes that unregistered packages will become first class with Pkg3 (which they will be once [https://github.com/JuliaLang/Pkg.jl/issues/492](https://github.com/JuliaLang/Pkg.jl/issues/492) is solved).

[Previous page](https://discourse.julialang.org/t/how-to-install-non-registered-dependencies-in-julia-0-7-1-0/13971.md?page=1)
