Problem with installing PythonPlot, CondaPKG (FreeBSD)

I posted this question micromamba a while ago, but haven’t gotten any responses. Maybe the post was in the wrong place.
I am reposting here, which seems more appropriate.
Thanks for any help.

It seems to me clear that PythonPlot.jl isn’t supported for FreeBSD, at least with default use of PythonCall.jl.

Since it used CondaPkg.jl that uses micromamba, and [micro]mamba doesn’t support FreeBSD, that I can see, neither seemingly conda.

Pip is though supported for FreeBSD, so you can use matplotlib that way with PyPlot.jl, or you can I believe hack PythonCall.jl to access system installed Python, and then use Pip to install packages, maybe that works with PythonCal too?

Other options are any other non-python related plotting packages, as a backend for Plots.jl or not, e.g. Makie.jl

Julia supports FreeBSD (tier 2), and Python supports too (tier 3), but that only means the languages work together, not strictly guaranteeing that any package for either language works, or any specific package manager. Probably though all pure Python packages installed with pip, and some more, and any pure Julia (not depending on JLLs) Julia packages.

@cdoris Is there a better way to support FreeBSD? I think it’s out of your hands, unless you want to support more than micromamba.

Seemingly one workaround might be to add/enable the Linux compatibility layer to FreeBSD?

I.e. this workaround for miniconda, for `Linux Compatibility Layer, might also work for micromamba (since it’s a clone of conda):

If that isn’t a solution, then seemingly all PythonCall/CondaPkg-related is in trouble on FreeBSD. You’re also likely making trouble for yourself even with Julia and JLL dependencies?

https://www.reddit.com/r/freebsd/comments/8pugsk/can_freebsd_be_used_for_data_analysis/

https://wiki.freebsd.org/Python

1 Like

It seems to me clear that PythonPlot.jl isn’t supported for FreeBSD, at least with default use of PythonCall.jl.

Since it used CondaPkg.jl that uses micromamba, and [micro]mamba doesn’t support FreeBSD, that I can see, neither seemingly conda.

Thanks for the detailed reply. After reading https://github.com/mamba-org/mamba/issues/1213 that you include below, I suspect that the reason micromamba “isn’t supported on FreeBSD” is something relatively trivial. However, I don’t have the time to dig it out.

Pip is though supported for FreeBSD, so you can use matplotlib that way with PyPlot.jl, or you can I believe hack PythonCall.jl to access system installed Python, and then use Pip to install packages, maybe that works with PythonCal too?

I do have matplotlib installed, and it works fine from Python (both system packages, nothing to do with Julia). I don’t understand what the whole Conda/Mamba issue is about. Do additional Python packages need to be installed for PythonPlot/matplotlib to work?
(I write more below, but my preferred solution for this is to somehow disable Conda and micromamba entirely, and install any extra Python packages, if needed, in my system’s Python installation.)

Other options are any other non-python related plotting packages, as a backend for Plots.jl or not, e.g. Makie.jl

Makie is good, but I prefer sticking with Plots.jl, since I’ve been using it a long time and I know the syntax. (I also use Gaston.jl, which works immediately with my system GnuPlot.)

Julia supports FreeBSD (tier 2), and Python supports too (tier 3), but that only means the languages work together, not strictly guaranteeing that any package for either language works, or any specific package manager. Probably though all pure Python packages installed with pip, and some more, and any pure Julia (not depending on JLLs) Julia packages.

Yes, that is a messy situation. E.g., I’ve also used the GR backend for Plots.jl in the past. Older versions of GR.jl used to have a way to point to a system-installed version of GR. Not any more. Now trying to Pkg.add(“GR”) attempts to install specific versions of llvm libraries! I find this unacceptable.

@cdoris Is there a better way to support FreeBSD? I think it’s out of your hands, unless you want to support more than micromamba.

Seemingly one workaround might be to add/enable the Linux compatibility layer to FreeBSD?

Certainly possible, but too heavyweight for something that is probably very simple.

I.e. this workaround for miniconda, for `Linux Compatibility Layer, might also work for micromamba (since it’s a clone of conda):

If that isn’t a solution, then seemingly all PythonCall/CondaPkg-related is in trouble on FreeBSD. You’re also likely making trouble for yourself even with Julia and JLL dependencies?

In the past (with v1.6.x, I believe) I’ve used PyPlot.jl with no problems. The error in the below post seems to be

ERROR: LoadError: Couldn't find libpython; check your PYTHON environment variable.

AFAIU FreeBSD is not well supported in Conda-land. I think you can get Conda itself to work on FreeBSD but repos like conda-forge (used by default in CondaPkg) don’t routinely build for FreeBSD.

However if you create a venv yourself with matplotlib installed in it, you can get PythonCall to use it by setting the JULIA_PYTHONCALL_EXE environment variable.

Edit: I’d like to add optional “python-only” backends to CondaPkg which completely avoid Conda and instead only install Python packages into a venv. But that will be a way off.

1 Like

Yes, I discovered that.

Ah, thanks very much. That does exactly what I wanted, to circumvent Conda-land entirely. I didn’t even create a venv.

2 Likes