Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a Conda.jl interpreter necessary for this code, or only a properly configured PyCall.python interpreter? #48

Open
tlarock opened this issue May 5, 2022 · 3 comments

Comments

@tlarock
Copy link

tlarock commented May 5, 2022

I'm wondering if it is necessary to use Conda.jl to manage matplotlib, pandas, and networkx, or if that is just offered out of convenience? All are available via pip, which is accessible via PyCall (as long as it is configured to an interpreter) and already being used to install hypernetx for plotting. If my PyCall points to a python interpeter with all of the relevant packages, everything should still work, correct?

I have it working at the moment, but to be honest I do not totally understand how, which is a bit concerning, so thought I would open an issue in case the answer is straightforward.

I am asking specifically because I am developing on an Apple Silicon Mac and the binaries for a python package I need to use are only installable via HomeBrew for me at the moment (they are not available on the conda channels for this machine). So even though it is not ideal for many reasons, I need to use the brew python as the interpeter for part of my scripts. If I can just use PyCall to manage python for SimpleHypergraphs.jl, it is no problem, since I can easily install all of the packages required in my brew python. So my question is whether there is any reason the internals of SimpleHypergraphs.jl need to use an interpreter installed using Conda.jl, or should I expect everything to work as long as my PyCall.python interpreter can load the necessary packages?

@tlarock tlarock changed the title Drop Conda.jl depndency? Is a Conda.jl interpreter necessary for this code, or only a properly configured PyCall.python interpreter? May 5, 2022
@tlarock tlarock changed the title Is a Conda.jl interpreter necessary for this code, or only a properly configured PyCall.python interpreter? Is a Conda.jl interpreter necessary for this code, or only a properly configured PyCall.python interpreter? May 5, 2022
@pszufe
Copy link
Owner

pszufe commented May 5, 2022

You are right - seems that the Conda dep is actually not needed.
It should be quite safe to drop it from the dependecies and remove using Conda from the source.
if you decide to make a PR with this modification, I will help if anything goes wrong :) Should be fairly easy.

Actually SimpleHypergraphs should work without Python altogether - Python is only being used for some types of visualizations.

@tlarock
Copy link
Author

tlarock commented May 6, 2022

Great, thanks for replying @pszufe ! I'm using your interface to hypernetx to plot Euler diagrams, so need the python interpreter in my case :)

I'll eventually need to get this all set up on a cluster, so if I manage to do everything without Conda.jl, at that point I will make a PR! But in the meantime, anyone seeing this discussion will know it is possible to work with just PyCall.jl, as that is what I am doing. The only requirement at the moment is that Conda.jl is installed for the project, but that happens regardless when the project is built, so should be no issue.

@pszufe
Copy link
Owner

pszufe commented May 6, 2022

PyCall can be built with an external Python, eg.: https://stackoverflow.com/questions/69968084/cannot-install-pycall-jl-with-julia-1-6-3-build-on-freebsd-13

This however should be better Anaconda/Miniconda rather than pure Python. A pure Python installation is also possible but often leads to some issues. If you decide for the pure Python path perhaps keep it as a separate Python installation rather than going with the in-built system Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants