[IPython-dev] kernel spect and how to thest them
Alessandro Dentella
sandro at e-den.it
Thu Feb 21 04:18:28 EST 2019
Thank you Thomas for the explanations that helped me get to a working
setup.
Rather than settings python interpreter and invoking -m
"argv": [
"/home/sandro/.virtualenvs/alma/bin/python3.6",
"-m",
"setup_jupyter", # this imports ipykernel_launcher
"-f",
"{connection_file}",
"--ext",
"django_extensions.management.notebook_extension"
I ended with this setup:
"argv": [
"/home/sandro/alma/bin/ipython",
"kernel",
"-f",
"{connection_file}",
"--ext",
"django_extensions.management.notebook_extension"
In my setup (I use buildout) bin/ipython is a script with the path
explicitely declared and running:
import IPython
if __name__ == '__main__':
sys.exit(IPython.start_ipython())
The reason I had to change this way is that ipykernel_launcher works
only if called directly (as is the cas with -m flag since the code is
in the "If __name__ == '__main__'" branch.
If my operation is for some reason incorrect, please let me know. I
got the impression the script jupyter should be used rather than
ipython...
sandro
More information about the IPython-dev
mailing list