Stop `CondaPkg` for finding dependencies in other projects

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), which I just bump the version to work now with PythonCall instead of PyCall. When installing in a new project environment, I get


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 without answer and I think is similar to this issue 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!

1 Like

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.

1 Like

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

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.

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

[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

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.

1 Like

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.

1 Like

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?