# Installing own package with dependency

**URL:** https://discourse.julialang.org/t/installing-own-package-with-dependency/73010
**Category:** General Usage
**Tags:** registry
**Created:** [December 13, 2021, 7:54am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010 "2021-12-13T07:54:44Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [December 13, 2021, 7:54am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/1 "2021-12-13T07:54:44Z")

</div>

Hi,

I have written a package `Lithe` (which I may unfortunately not share…). I have a GIT clone of it on my PC. Part of its `Project.toml` reads

```julia
name = "Lithe"
...version = "0.1.0"

[deps]
...
Espy = "1729f5b0-844e-4123-9b7f-b77abbdddeb6"
...
[compat]
julia = "1.7.0"

```

The dependency `Espy` (also home-made) is hosted at [GitHub](https://github.com/PhilippeMaincon/Espy/blob/master/Project.toml), and its `Project.toml` reads

```julia
name = "Espy"
uuid = "1729f5b0-844e-4123-9b7f-b77abbdddeb6"
authors = ["Philippe Maincon <...@...>"]
version = "0.1.0"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

```

Now, I want to work using `Lithe`. Because `Lithe` is not hosted on a server (and I might tweak it), use `dev`

```julia
(@v1.7) pkg> dev "C:\Users\philippem\Documents\GIT\Lithe"

```

I get an error I do not make sense of:

```julia
ERROR: Unsatisfiable requirements detected for package Espy [1729f5b0]:
 Espy [1729f5b0] log:
 ├─Espy [1729f5b0] has no known versions!
 └─restricted to versions * by Lithe [fc63d2cd] — no versions left
   └─Lithe [fc63d2cd] log:
     ├─possible versions are: 0.1.0 or uninstalled
     └─Lithe [fc63d2cd] is fixed to version 0.1.0

```

Watchamean `Espy has no known versions`?, Espy’s `Project.toml` declares it to be `Espy 0.1.0`.

I’d be thankful for any pointer.

---

<div class="post-metadata">

### Author: ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)
#### Post date: [December 13, 2021, 7:57am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/2 "2021-12-13T07:57:05Z")

</div>

You may add Espy first, and then try to dev Lithe.

---

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [December 13, 2021, 8:05am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/3 "2021-12-13T08:05:04Z")

</div>

Hi Liu,

This may be a good workaround. however, I need to be able to distribute `Lithe` within my company, and so I would like to take advantage of Julia’s package manager. And clearly I do not understand the package manager very well yet.

😀

Philippe

---

<div class="post-metadata">

### Author: ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)
#### Post date: [December 13, 2021, 8:10am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/4 "2021-12-13T08:10:44Z")

</div>

For this case, [LocalRegistry.jl](https://github.com/GunnarFarneback/LocalRegistry.jl) may be a good choice for you, though I have no experience in using it.

---

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [December 13, 2021, 8:31am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/5 "2021-12-13T08:31:01Z")

</div>

I have read (superficially) the README file, and this is interesting: if I understand correctly, `LocalRegistry.jl` would allow me to create a package registry, either

- for my personal use
- for distribution at company level  
and thus provide me with an elegant distribution solution. I will definitely study this, thank you.

But I am still curious about what I did wrong to get this error message: using `dev` on a local package that has a publicly hosted dependency should work if done correctly, shouldn’t it?

---

<div class="post-metadata">

### Author: ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)
#### Post date: [December 13, 2021, 8:39am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/6 "2021-12-13T08:39:43Z")

</div>

I always do such things. There is no problem. If Espy is not registered in the General Registry, even it is a public git repo, you have to `add Espy_github_URL` it first before `dev Lithe`.

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [December 13, 2021, 8:48am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/7 "2021-12-13T08:48:38Z")

</div>

> [@Philippe\_Maincon1](#):
>
> for distribution at company level  
> and thus provide me with an elegant distribution solution. I will definitely study this, thank you.

Yes, this is a typical use case for the `LocalRegistry` package.

> [@Philippe\_Maincon1](#):
>
> But I am still curious about what I did wrong to get this error message: using `dev` on a local package that has a publicly hosted dependency should work if done correctly, shouldn’t it?

Yes, but unless you have `dev`ed the dependency first or have it available in a registry, Pkg does not know where to find information about that package.

---

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [December 13, 2021, 8:55am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/8 "2021-12-13T08:55:56Z")

</div>

Shie-shie! This works .

I am surprised though: `Lithe` has plenty other dependencies which I do not need to add. OHHH! Now I get it! There is a Julia-package sort-of-DNS server somewhere, and it has never heard of `Espy`.

I reckon I need to follow [these instructions](https://github.com/gridap/Gridap.jl/wiki/How-to-register-a-julia-package).

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [December 13, 2021, 9:10am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/9 "2021-12-13T09:10:07Z")

</div>

[https://github.com/JuliaRegistries/General](https://github.com/JuliaRegistries/General)

---

<div class="post-metadata">

### Author: ![Philippe\_Maincon1](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)
#### Post date: [December 13, 2021, 9:25am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/10 "2021-12-13T09:25:05Z")

</div>

There we have it. Thanks!

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [December 13, 2021, 9:42am UTC](https://discourse.julialang.org/t/installing-own-package-with-dependency/73010/11 "2021-12-13T09:42:02Z")

</div>

> [@Philippe\_Maincon1](#):
>
> I reckon I need to follow [these instructions](https://github.com/gridap/Gridap.jl/wiki/How-to-register-a-julia-package).

Depends on whether your package is of public interest. If it’s something that’s only useful within your company, registering it in your own registry is more appropriate and very convenient with `LocalRegistry`.
