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

Respect JULIA_PROJECT environment variable if set #426

Open
schlichtanders opened this issue Nov 22, 2023 · 5 comments
Open

Respect JULIA_PROJECT environment variable if set #426

schlichtanders opened this issue Nov 22, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@schlichtanders
Copy link
Contributor

schlichtanders commented Nov 22, 2023

I am using the python package juliacall and am surprised to find that it ignores JULIA_PROJECT environment variable.
Julia documentation about JULIA_PROJECT.

It would be great if this standard variable is respected. Currently juliacall opens a new julia environment pyjuliapkg

@schlichtanders schlichtanders added the enhancement New feature or request label Nov 22, 2023
@schlichtanders
Copy link
Contributor Author

schlichtanders commented Nov 22, 2023

It seems related to https://github.com/JuliaPy/PyJuliaPkg in that a workaround could be to set PYTHON_JULIAPKG_PROJECT

EDIT: This is not working because of this related bug JuliaPy/pyjuliapkg#15 - PyJuliaPkg will simply delete the entire project folder. There is no workaround for this behaviour currently.

@schlichtanders
Copy link
Contributor Author

It seems there is not a single workaround to start JuliaCall in a predefined environment.
Respecting the environment variable JULIA_PROJECT could be a good way to add this feature.

@schlichtanders
Copy link
Contributor Author

PythonCall already sets up a pseudo juliacall package when plainly run from julia.

Maybe this already existing mechanism could be reused to start juliacall in an existing environment.

@cjdoris
Copy link
Collaborator

cjdoris commented Nov 22, 2023

Ignoring JULIA_PROJECT is intended. You can set PYTHON_JULIAPKG_PROJECT and PYTHON_JULIAPKG_OFFLINE=yes to get the behaviour you want, I think?

@schlichtanders
Copy link
Contributor Author

Thank you for reminding me that both variables need to be set. For me, coming from julia, it is very unintuitive to set two environment variables in order to get an Julia environment to work.

My tests where successful, it worked. Thank you.


What about translating the JULIA_PROJECT environment variable automatically to those two PYTHON_JULIAPKG environment variables?

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

No branches or pull requests

2 participants