You could include this in a startup script.
https://stackoverflow.com/questions/32211109/automate-standard-jupyter-ipython-notebook-imports

But I don't think you should do this. It'd be more transparent and
transferable (e.g., if you had to email a notebook to a colleague) to
create a setup.py file for your module and install it as a proper library.
-paul

On Tue, Mar 27, 2018 at 1:57 PM, Eric Gayer <[email protected]> wrote:

> Hi guys,
>
> I am struggling to understand how to permanently set the path to my own
> modules directory for any jupyter notebook (and/or any jupyter notebook in
> jupyter lab).
>
> In spyder, the PYTHONPATH manager helps adding paths pointing  modules.
> Using jupyter notebook, all I found is to add this piece of code each time
> we start/create a notebook
>
> import sys
> sys.path.append("path to my modules dir")import mymodule as mm
>
> How to permanently add a path to modules so every new jupyter notebook
> understand it ?
>
> Thanks for your help
> Eric
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/61736ec5-4306-4199-9831-3ed8fc474ea1%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/61736ec5-4306-4199-9831-3ed8fc474ea1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CADT3MEALVCgG%3DrHTrZhBOo91QEED1UHwPb2gs4wgEMAeAaLPFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to