# How does CondaPkg achieve Pkg integration internally?

**URL:** <https://discourse.julialang.org/t/how-does-condapkg-achieve-pkg-integration-internally/126699>\
**Category:** General Usage\
**Tags:** interoperability, python, condapkg\
**Created:** [March 7, 2025, 10:27pm UTC](https://discourse.julialang.org/t/how-does-condapkg-achieve-pkg-integration-internally/126699 "2025-03-07T22:27:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Post date:** [March 7, 2025, 10:27pm UTC](https://discourse.julialang.org/t/how-does-condapkg-achieve-pkg-integration-internally/126699/1 "2025-03-07T22:27:11Z")

</div>

Does CondaPkg override `Pkg.add` or `Pkg.precompile` to install Python dependencies listed in `CondaPkg.toml` when a user `add` or `import` a Julia package that uses CondaPkg? The process seems a little too magical, so I’d like to confirm if this involves some benign type piracy of hijacking `Pkg`.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [March 8, 2025, 2:40am UTC](https://discourse.julialang.org/t/how-does-condapkg-achieve-pkg-integration-internally/126699/2 "2025-03-08T02:40:45Z")

</div>

I skimmed CondaPkg’s source for “add”, and I didn’t see anywhere that extended the `Pkg.add` function, let alone overwrote a method. CondaPkg has its own `add` for CondaPkg.toml that `CondaPkg.PkgREPL. __init__ ` contributes to the Pkg REPL mode as the `conda add` command, but that shouldn’t affect `Pkg.add` or the `add` command. I have no idea, good question.
