-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
Environment of a new notebook #1001
Comments
IJulia starts notebooks in the environment of the directory where the project and manifest files are (or if they don't exist, in the default environment). If you have two notebooks in the same directory, they will use the same environment. To circumvent this, just use multiple directories (you have to anyway to create different project and manifest files). |
I'm not sure what that means. Which project and manifest files? |
I think that was a typo -- I think I meant to say
Sorry for that.
This is probably a JupyterLab behavior. The notebook files always exist (as far as I know) even if you haven't saved them yet (e.g., creating a new notebook will create a file on disk called "Untitled.ipynb" or whatever). At the end of the day, IJulia is actually not even aware of the notebook files. From IJulia's (and IPython, IRKernel, etc.) perspective, it is started in a particular working directory and then just runs a server that speaks the Jupyter protocol in order to execute code (and the Jupyter protocol is just a fancy REPL - it has no idea about your notebook files). If creating a new notebook starts it in the same directory as the previous notebook, that's just because Jupyter is spawning the Julia process in that directory. If that's the case, then this would be an upstream issue (with Jupyter Notebook or Jupyter Lab). |
When opening a new notebook with
This is still confusing because when running A better default action would be equivalent to running: |
It seems like creating a new notebook (File->New Notebook) starts it in the same environment as the last open notebook. I'm not sure if this is deliberate, but I find it a bit surprising & confusing (especially since there is no visual indication of the environment in the interface).
I would expect a new notebook to be in the default environment, or perhaps in the same environment that
notebook()
was called from.ref #820
The text was updated successfully, but these errors were encountered: