[IPython-dev] Finding the subcommand names
steve at holdenweb.com
Fri Feb 12 07:08:12 EST 2016
It would seem foolhardy to attempt MacPorts installation of something
that's currently evolving as fast as Jupyter. S
On Fri, Feb 12, 2016 at 10:48 AM, MinRK <benjaminrk at gmail.com> wrote:
> > FWIW, IPython/Jupyter were installed via MacPorts.
> This seems the most important bit. Jupyter doesn't add `-X.Y` to its
> scripts, so it's probably macports doing this (I don't know how/where they
> do this). When you type `jupyter notebook`, that's really just a synonym
> for `jupyter-notebook`. MacPorts should really be providing this
> executable. If they aren't they may need to ship a patch to Jupyter's
> command dispatch to add the version suffix.
> If there is a patch to be made, it would be in jupyter_core.command, which
> implements the subcommand dispatch. We could conceivably detect a suffix on
> the executable and add it to how subcommands are found.
> On Fri, Feb 12, 2016 at 10:14 AM, Akim Demaille <akim at lrde.epita.fr>
>> The most recent version of IPython complains when I run `ipython
>> > $ ipython notebook
>> > [TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is
>> deprecated and will be removed in future versions.
>> > [TerminalIPythonApp] WARNING | You likely want to use `jupyter
>> notebook`... continue in 5 sec. Press Ctrl-C to quit now.
>> So I obey, but it fails:
>> > $ jupyter-3.4 notebook
>> > jupyter: 'notebook' is not a Jupiter command
>> What? What are the existing commands?
>> > $ jupyter-3.4 --help
>> > usage: jupyter-3.4 [-h] [--version] [--config-dir] [--data-dir]
>> > [--runtime-dir] [--paths] [--json]
>> > [subcommand]
>> > Jupyter: Interactive Computing
>> > positional arguments:
>> > subcommand the subcommand to launch
>> > optional arguments:
>> > -h, --help show this help message and exit
>> > --version show the jupyter command's version and exit
>> > --config-dir show Jupyter config dir
>> > --data-dir show Jupyter data dir
>> > --runtime-dir show Jupyter runtime dir
>> > --paths show all Jupyter paths. Add --json for machine-readable
>> > format.
>> > --json output paths as machine-readable json
>> > Available subcommands: 3.4 kernelspec-3.4 migrate-3.4 nbconvert-3.4
>> > nbextension-3.4 notebook-3.4 trust-3.4
>> Huh, I need that -3.4 extension :(
>> > $ jupyter-3.4 notebook-3.4
>> > [I 10:09:00.941 NotebookApp] The port 8888 is already in use, trying
>> another random port.
>> > [I 10:09:00.942 NotebookApp] The port 8889 is already in use, trying
>> another random port.
>> But that `ipython notebook` is inside a shell script that I
>> provide my users with. So I need something portable. Hence
>> the question is: what is the advertised way to know how the
>> `notebook` command is to be invoked? Yeah, I can grep and
>> sed etc. the help message, but that’s really messy. Besides,
>> how do I know what conventions are used on other platforms/distros?
>> That `notebook-3.4` instead of `notebook` is really an additional
>> complexity I would have liked not to have.
>> FWIW, IPython/Jupyter were installed via MacPorts.
>> IPython-dev mailing list
>> IPython-dev at scipy.org
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev