Skip to content
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

Can't open qtconsole from outside source tree #1086

Closed
miham opened this issue Dec 1, 2011 · 5 comments
Closed

Can't open qtconsole from outside source tree #1086

miham opened this issue Dec 1, 2011 · 5 comments
Milestone

Comments

@miham
Copy link

miham commented Dec 1, 2011

I've got fresh ipython source. When I try to run qtconsole from outside it's
source tree, e.g. from $HOME, qtconsole opens, but doesn't show the prompt (it only
displays welcome message). And in terminal the description of command line
options gets printed. Here is the example:

miha:~$ python2 /home/miha/coding/repos/ipython/ipython.py qtconsole
IPython: an enhanced interactive Python shell.

Options
-------

IPython command-line arguments are passed as '--<flag>', or '--<name>=<value>'.

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--no-autoindent
    Turn off autoindenting.
--deep-reload
    Enable deep (recursive) reloading by default. IPython can use the
    deep_reload module which reloads changes in modules recursively (it
    replaces the reload() function, so you don't need to change anything to
    use it). deep_reload() forces a full reload of modules whose code may
    have changed, which the default reload() function does not.  When
    deep_reload is off, IPython will use the normal reload(), but
    deep_reload will still be available as dreload(). This feature is off
    by default [which means that you have both normal reload() and
    dreload()].
--pylab
    Pre-load matplotlib and numpy for interactive use with
    the default matplotlib backend.
--autoindent
    Turn on autoindenting.
--automagic
    Turn on the auto calling of magic commands. Type %%magic at the
    IPython  prompt  for  more information.
--no-deep-reload
    Disable deep (recursive) reloading by default.
--no-stdout
    redirect stdout to the null device
--no-automagic
    Turn off the auto calling of magic commands.
--nosep
    Eliminate all spacing between prompts.
--pprint
    Enable auto pretty printing of results.
--quiet
    set log level to logging.CRITICAL (minimize logging output)
--pdb
    Enable auto calling the pdb debugger after every exception.
--color-info
    IPython can display information about objects via a set of func-
    tions, and optionally can use colors for this, syntax highlighting
    source code and various other elements.  However, because this
    information is passed through a pager (like 'less') and many pagers get
    confused with color codes, this option is off by default.  You can test
    it and turn it on permanently in your ipython_config.py file if it
    works for you.  Test it and turn it on permanently if it works with
    your system.  The magic function %%color_info allows you to toggle this
    interactively for testing.
--init
    Initialize profile with default config files.  This is equivalent
    to running `ipython profile create <profile>` prior to startup.
--no-pdb
    Disable auto calling the pdb debugger after every exception.
--debug
    set log level to logging.DEBUG (maximize logging output)
--no-color-info
    Disable using colors for info related things.
--no-pprint
    Disable auto auto pretty printing of results.
--no-stderr
    redirect stderr to the null device
--profile=<Unicode> (BaseIPythonApplication.profile)
    Default: u'default'
    The IPython profile to use.
--shell=<Int> (KernelApp.shell_port)
    Default: 0
    set the shell (XREP) port [default: random]
--parent=<Int> (KernelApp.parent)
    Default: 0
    kill this process if its parent dies.  On Windows, the argument specifies
    the HANDLE of the parent process, otherwise it is simply boolean.
--ip=<Unicode> (KernelApp.ip)
    Default: '127.0.0.1'
    Set the IP or interface on which the kernel will listen.
--pylab=<CaselessStrEnum> (IPKernelApp.pylab)
    Default: None
    Choices: ['tk', 'qt', 'wx', 'gtk', 'osx', 'inline', 'auto']
    Pre-load matplotlib and numpy for interactive use, selecting a particular
    matplotlib backend and loop integration.
--cache-size=<Int> (InteractiveShell.cache_size)
    Default: 1000
    Set the size of the output cache.  The default is 1000, you can change it
    permanently in your config file.  Setting it to 0 completely disables the
    caching system, and the minimum value accepted is 20 (if you provide a value
    less than 20, it is reset to 0 and a warning is issued).  This limit is
    defined because otherwise you'll spend more time re-flushing a too small
    cache than working
--colors=<CaselessStrEnum> (InteractiveShell.colors)
    Default: 'Linux'
    Choices: ('NoColor', 'LightBG', 'Linux')
    Set the color scheme (NoColor, Linux, or LightBG).
--iopub=<Int> (KernelApp.iopub_port)
    Default: 0
    set the iopub (PUB) port [default: random]
--hb=<Int> (KernelApp.hb_port)
    Default: 0
    set the heartbeat port [default: random]
--logfile=<Unicode> (InteractiveShell.logfile)
    Default: ''
    The name of the logfile to use.
--stdin=<Int> (KernelApp.stdin_port)
    Default: 0
    set the stdin (XREQ) port [default: random]
--c=<Unicode> (InteractiveShellApp.code_to_run)
    Default: ''
    Execute the given command string.
--autocall=<Enum> (InteractiveShell.autocall)
    Default: 1
    Choices: (0, 1, 2)
    Make IPython automatically call any callable object even if you didn't type
    explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
    The value can be '0' to disable the feature, '1' for 'smart' autocall, where
    it is not applied if there are no more arguments on the line, and '2' for
    'full' autocall, where all callable objects are automatically called (even
    if no arguments are present). The default is '1'.
--ipython-dir=<Unicode> (BaseIPythonApplication.ipython_dir)
    Default: u'/home/miha/.config/ipython'
    The name of the IPython directory. This directory is used for logging
    configuration (through profiles), history storage, etc. The default is
    usually $HOME/.ipython. This options can also be specified through the
    environment variable IPYTHON_DIR.
--logappend=<Unicode> (InteractiveShell.logappend)
    Default: ''
    Start logging to the given file in append mode.
--log-level=<Enum> (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.
--ext=<Unicode> (InteractiveShellApp.extra_extension)
    Default: ''
    dotted module name of an IPython extension to load.

To see all available configurables, use `--help-all`

[IPKernelApp] Unrecognized flag: '-f'

And here is the contents of the qtconsole:

Python 2.7.2 (default, Nov 21 2011, 17:25:27) 
Type "copyright", "credits" or "license" for more information.

IPython 0.12.beta -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
%guiref   -> A brief reference about the graphical user interface.

The terminal version of ipython works fine and qtconsole works if launched with command miha:ipython(master)$ python2 ipython.py qtconsole.

@takluyver
Copy link
Member

I think you need to install it - which you can do in a virtualenv, if you want to keep the development version separate from your main system. The ipython.py script is just a convenience for testing it.

@fperez
Copy link
Member

fperez commented Dec 1, 2011

Yes, this is not a bug. You must install ipython first like any other package if you want to use it from anywhere in your filesystem.

python setup.py install [possibly with --user or --prefix=whatver]

See the standard python documentation if you need further help with how to install python packages.

You can also do a setuptools development installation, if you want to continue updating the source tree and not have to reinstall each time you update; for that use

python setupegg.py develop

@fperez fperez closed this as completed Dec 1, 2011
@miham
Copy link
Author

miham commented Dec 1, 2011

Thanks! I will try what you two said.

It seems strange though that the terminal version is working, just qtconsole doesn't work!

@takluyver
Copy link
Member

I think it's because the Qt console starts up a second process for the kernel, which works like an ipython ... command.

@fperez
Copy link
Member

fperez commented Dec 1, 2011

On Thu, Dec 1, 2011 at 1:06 PM, Thomas
reply@reply.github.com
wrote:

I think it's because the Qt console starts up a second process for the kernel, which works like an ipython ... command.

Correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants