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

Set JULIA_PYTHONCALL_EXE=$CONDA_PREFIX/bin/python on activate #234

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mkitti
Copy link
Contributor

@mkitti mkitti commented Sep 20, 2022

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@isuruf
Copy link
Member

isuruf commented Sep 20, 2022

why?

@mkitti
Copy link
Contributor Author

mkitti commented Sep 20, 2022

@cjdoris , I would appreciate your thoughts on setting the environment variable when we have julia installed by conda.

export JULIA_PYTHONCALL_EXE="$CONDA_PREFIX/bin/python"

@mkitti mkitti changed the title Set JULIA_PYTHONCALL_EXE=which python on activate Set JULIA_PYTHONCALL_EXE=$CONDA_PREFIX/bin/python on activate Sep 20, 2022
@mkitti
Copy link
Contributor Author

mkitti commented Sep 20, 2022

why?

Otherwise, PythonCall.jl via CondaPkg.jl would create a new conda environment. Presumably one would want to default to using the current conda environment if we're already managing Julia in that conda environment rather than create a new one.

@mkitti
Copy link
Contributor Author

mkitti commented Sep 20, 2022

@cjdoris
Copy link

cjdoris commented Sep 20, 2022

Seems reasonable. Beware that this means PythonCall will not use CondaPkg, and therefore all the dependencies you need must already be installed into the pre-existing Conda environment. But I assume this is the intention anyway.

You probably also want to set JULIA_CONDAPKG_BACKEND=Null, which will prevent other things that depend on CondaPkg from installing Python dependencies.

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

Successfully merging this pull request may close these issues.

4 participants