# Package dependencies

**URL:** <https://discourse.julialang.org/t/package-dependencies/112393>\
**Category:** General Usage\
**Created:** [April 2, 2024, 12:54am UTC](https://discourse.julialang.org/t/package-dependencies/112393 "2024-04-02T00:54:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lancejnelson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lancejnelson/32/21898_2.png) [@lancejnelson](https://discourse.julialang.org/u/lancejnelson)\
**Post date:** [April 2, 2024, 12:54am UTC](https://discourse.julialang.org/t/package-dependencies/112393/1 "2024-04-02T00:54:09Z")

</div>

Currently trying to understand packages and dependencies. I’ve created a package that just holds type definitions, made the git repo and done all of the setup. Now I’m creating a second package that will need access to the types package. How do I add the types package as a dependency to the second package. Like this?

```julia
pkg> activate myPackage
pkg> add local/path/to/types/package

```

or do I need to specify the address to the git repo?

Thanks

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [April 2, 2024, 2:01am UTC](https://discourse.julialang.org/t/package-dependencies/112393/2 "2024-04-02T02:01:55Z")

</div>

> [@lancejnelson](#):
>
> Like this?

You can do that, though then you’re going to be bound to the current version of the first package. If you’re actively developing both together, you probably want `] dev path/to/OtherPackage`.

[https://pkgdocs.julialang.org/v1/managing-packages/](https://pkgdocs.julialang.org/v1/managing-packages/)

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 2, 2024, 2:41am UTC](https://discourse.julialang.org/t/package-dependencies/112393/3 "2024-04-02T02:41:36Z")

</div>

`Pkg.add` would require the local package to be in a git repository to work. `local/pathpkgdocs.julialang` should have a `.git` subdirectory that is initialized.

[https://pkgdocs.julialang.org/v1/managing-packages/#Adding-a-local-package](https://pkgdocs.julialang.org/v1/managing-packages/#Adding-a-local-package)

As Kevin mentioned, you almost certainly want to `Pkg.develop` a local package.

[https://pkgdocs.julialang.org/v1/managing-packages/#developing](https://pkgdocs.julialang.org/v1/managing-packages/#developing)
