Advice on Python co-existing with Julia

For those who use local installations of Julia and Python, especially on a Mac Book, I am looking for advice regarding the best installation options for Python. I’ve used Anaconda for several years, and use JupyterLab for both Julia and Python. I recently had to downgrade my Julia for a class I am taking and had what seemed to be conflicts with using Jupyter and Anaconda. WebIO was a particular problem, but not the only problem. The problem could have been cruft that naturally arises from using a computer.

I uninstalled everything and reinstalled Julia for the class. Base Python 3 is installed and I need to add packages, etc. What advice do people have regarding using Anaconda, Pip, etc. to co-exist with Julia?

Thanks
Jim Michael

Welcome to the Julia community. From the docs:

By default on Mac and Windows systems, Pkg.add(“PyCall”) or Pkg.build(“PyCall”) will use the Conda.jl package to install a minimal Python distribution (via Miniconda) that is private to Julia (not in your PATH). You can use the Conda Julia package to install more Python packages

I guess the defaults are good, I’m not sure what the problem is on macOS, as I use Linux.

It’s not clear to me you’re already using PyCall, i.e. Julia and Python together. Are you only using Jupyter for Julia and Python separately there? I know Julia and Python can fully coexist as separate installations, as they do by default, and I don’t think Jupyter changes anything in that regard, while I’ve never used it.

If you do not mix the languages in the same notebook I guess Julia and Python should just work and I know you can also mix the two in same notebook with PyCall.

On Linux I do use pip for the system installation of Python, but could use Conda as a non-default option. That’s what you have my default with PyCall on macOS, but you can also use the system Python or Anaconda I believe.

I would also consider Pluto.jl for Julia as a replacement for Jypyter (you could keep using it for Python being fully separate). Pluto.jl is Julia-only in the sense that only Julia can be your main language, but you can still call Python or any language there from Julia.

1 Like

Thank you for the insight. My use cases are relatively simple. I’m using Julia and Python with JupyterLab, so working in separate notebooks with those kernels. I use the Julia REPL a lot and sometimes Visual Studio Code. I have not had the need to use PyCall, but am aware of it and keep it in mind. I will look at Pluto.jl too. Thanks again.