# Stop \`CondaPkg\` for finding dependencies in other projects

**URL:** <https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562>\
**Category:** General Usage\
**Tags:** pythoncall, condapkg\
**Created:** [November 12, 2024, 10:43pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562 "2024-11-12T22:43:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![facusapienza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/facusapienza/32/24317_2.png) [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Post date:** [November 12, 2024, 10:43pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/1 "2024-11-12T22:43:23Z")

</div>

Hi,

I am using `CondaPkg` and `PythonCall` for more than one of my projects. When I install a second project using `CondaPkg`, this second one finds the dependencies of the first one and tries to solve all the dependencies together, which of course it’s not a desirable behavior since these different projects don’t need to be compatible.

I am installing `SphereUDE @0.1.4` (link [here](https://github.com/ODINN-SciML/SphereUDE.jl)), which I just bump the version to work now with PythonCall instead of PyCall. When installing in a new project environment, I get

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/0/901b5cd4ea569caa7540afd0eb6f4087c42f93e6.png)  
You can see that `CondaPkg` has found three different dependencies files `CondaPkg.toml`, even when I i just interested in this to work for my new installed library.

This point has been raised in this other [post](https://discourse.julialang.org/t/how-to-shut-up-condapkg/101446) without answer and I think is similar to this [issue](https://github.com/JuliaPy/CondaPkg.jl/issues/112) raised by @cjdoris.

Is this the default behavior? Is there a way to turn this off? Furthermore, every person who installs SphereUDE will run into this same issue? As developer of these libraries, I would like to find a solution that will best work for the users. Thanks!

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [November 12, 2024, 11:01pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/2 "2024-11-12T23:01:11Z")

</div>

This is intentional behaviour. Your project depends on those 3 packages listed (PythonCall, SphereUDE and Sleipnir) and therefore needs to install the Conda packages they depend on so that they can work properly.

---

<div class="post-metadata">

**Author:** ![facusapienza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/facusapienza/32/24317_2.png) [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Post date:** [November 12, 2024, 11:10pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/3 "2024-11-12T23:10:48Z")

</div>

The project does not depend of Sleipnir, which is the library causing compatibility problems (and the ones I am trying to avoid 😅).

The dependencies of this project has PythonCall and SphereUDE (the library I am trying to install), but I want to definitively not interfere with Sleipnir or any other local CondaPkg dependency.

---

<div class="post-metadata">

**Author:** ![facusapienza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/facusapienza/32/24317_2.png) [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Post date:** [November 13, 2024, 2:23am UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/4 "2024-11-13T02:23:28Z")

</div>

Just to be more specific, here is what I have in my `Project.toml`:

```julia
[deps]
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
SphereUDE = "d7416ba7-148a-4110-b27d-9087fcebab2d"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

```

and I further check that my `Manifest.toml` does not have `Sleipnir` in its dependencies, however when trying to install and use `SphereUDE` I still get

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/e/5e76fb258a45b1de68538b47cf83a2288acefc4c.png)

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [November 13, 2024, 7:54pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/5 "2024-11-13T19:54:19Z")

</div>

CondaPkg looks through your whole load path, not just the active project. My guess is you have Sleipnir installed in your global environment, e.g. `~/.julia/environments/v1.11`.

---

<div class="post-metadata">

**Author:** ![facusapienza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/facusapienza/32/24317_2.png) [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Post date:** [November 13, 2024, 9:26pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/6 "2024-11-13T21:26:10Z")

</div>

Thank you @cjdoris ! Indeed, those other libraries where in the global environment and the behaviour stoped once I remove them from the base/global environment.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [November 13, 2024, 11:12pm UTC](https://discourse.julialang.org/t/stop-condapkg-for-finding-dependencies-in-other-projects/122562/7 "2024-11-13T23:12:45Z")

</div>

It seems it shouldn’t look into the global environment…

If it’s intentional, then you CAN remove from there, or use Docker or something, but you might want to have a local environment/app and nothing else looked at.

It his is not changed, considered a breaking change, then consider some ENV var to do it, control it.

I would much prefer non-global default (unless global maybe ok in REPL/interactive), and possibly ENV to override.

I’ve seen “CondaPkg found” sometimes and sometimes not, why not always? Is it one some timeout, if files old enough?
