Hi Julia folks,
I have a registered package that used to install PyPlot with a build.jl in a deps/ folder as follows:
import Pkg, Conda
@info "building!"
Conda.pip_interop(true)
Conda.pip("install", "matplotlib==3.7.3")
Conda.add("matplotlib")
ENV["PYTHON"] = joinpath(Conda.ROOTENV, "bin", "python")
Pkg.build("PyCall")
@info "built PyCall!"
I switched to pip_interop because of Conda errors a few years ago (which have since been fixed), but I never changed the above code in a few subsequent releases.
Now, because of recent Conda.jl changes that no longer use use pip_interop I’m having trouble with previous releases not installing.
In the latest release, I just remove the Conda.pip parts of the above build script and it works fine.
What is a good way to deal with this in previously released, registered versions?
That’s why there are project environments—to keep all the dependencies synched. If your registered package used to work it should continue to in the same environment. You should have seen a log screen with the conflicts, which may help in creating a fresh environment.
This is unfortunately, not the solution (or it may be part of one). While I could possibly instantiate a Manifest.toml for the exact environment that previously worked, it does not stop those who wish to install the previous version from running into the pip_interop errors. The build log file shows errors, even for a fresh julia install and my package just as before:
WARNING conda.cli.main_config:_set_key(456): Key pip_interop_enabled is an alias of prefix_data_interoperability; setting value with latter
[ Info: building!
[ Info: Downloading miniconda installer ...
[ Info: Installing miniconda ...
[ Info: Running `conda config --set pip_interop_enabled true --file /home/131/ts7941/.julia/conda/3/x86_64/condarc-julia.yml` in root environment
ERROR: LoadError: pip_interop is not enabled
Use `Conda.pip_interop(true; [env::Environment=ROOTENV])` to enable
Any thoughts? I could release a minor version with the Conda.pip parts removed from the build.jl but was wondering if there are other suggestions?
1 Like
Ah, sorry I don’t have anything further to suggest. In all my years with using Conda outside Python I’ve had scant luck.