How to use Pluto+Pkg with Currently Activated Project? #2983
-
Julia has a commandline argument to activate the project in the current directory (--project). The nice thing about this is that you only need to be in a project subdirectory, you don't need to pass the project root in explicitly. When activating a Pkg environment in Pluto, I don't know how to activate a project in the same way. Is there a way to do this, or to use the environment julia starts in when --project is passed (Base.active_project() in the notebook does not match this environment)? I know the explicit or relative path can be used with Pkg.activate(), but this can be annoying when sharing many notebooks or copying notebooks to different places in the project. It would be nice if there were a simple line I could use for all the notebooks that didn't need to hardcode a path. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
Base.current_project()
can be used to find the closest parent Project.toml like the--project
flag does.