-
Notifications
You must be signed in to change notification settings - Fork 332
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
Julia project specific environments (Project.toml) #1483
Comments
We're using IJulia for our Julia execution engine. The IJulia guidance seems to be to add using Pkg
Pkg.activate(".") to the notebook. In Quarto, it'd be sufficient to add this once, to the very first code block. (All code blocks execute in the same "context") I agree that it would be nice for different engines to configure settings like this, but we have to design this thoughtfully to avoid a proliferation of different option styles and conventions across different engines. This is a bigger change than just the Julia setting, so I don't have a concrete timeline for when we'll add this. |
If I am writing a book (in Quarto terminology), do I need to add those lines to a block in each |
Yes, you would. Each |
In my windows machine, it just start the Jupyter kernel in the current environment folder. |
Just to add some other behaviors of the Julia environments: if Julia is installed via juliaup (which will become the de facto language version manager), then Julia resides in ] activate @NewEnv So that way one can always go to this Also, when initializing the julia REPL, it is easy to start with the desired julia --project=@NewEnv These behaviors bring me to the idea of having something like the following in the YAML:
or something like:
or
I guess the |
Posting here for reference a useful comment from Discussion related thread The Julia project path may be specified by the environment variable Environment variables available at code block execution can be set in an Originally posted by @MHellmund in #1482 (comment) |
Let me just add:
|
Discussed in #1482
Originally posted by tbeason July 21, 2022
There is some discussion on the Quarto guide about how to use various environments from R or Python. Right now, it seems that in order to use Julia code blocks I must keep any packages that I want to use in my global/default environment, rather than project specific ones. In Julia, this done by having a
Project.toml
file for the project (and perhaps aManifest.toml
also but not always needed).When starting Julia you can call
julia --project=Project.toml
if it is in the current directory or you can start Julia normally and from the REPL type]
and thenactivate .
or you can write
I know that the last option would work if I added it to a (each?) code block, but is there a way to just add something to the
quarto.yml
file instead to use aProject.toml
file for the whole project?The text was updated successfully, but these errors were encountered: