ipython is installed but cannot be recognized by auto
auto -i
Sorry, ipython is not available on this system.
Name : ipython
Version : 0.12-2
URL : http://ipython.org
Licenses : Modified BSD
Groups : None
Provides : ipython3
Depends On : python sqlite3 python-distribute
Optional Deps : wxpython: needed for ipythonx and ipython-wx
python-nose: if you want to run IPython's test suite
pyqt: for ipython-qtconsole
sip: for ipython-qtconsole
python-pygments: for ipython-qtconsole
python-pyzmq: for ipython-qtconcole
python-tornado: for ipython notebook
Required By : None
Conflicts With : None
Replaces : ipython3
Installed Size : 5548.00 KiB
Packager : Kyle Keen <keenerd@gmail.com>
Architecture : any
Build Date : Sun 25 Dec 2011 12:27:04 AM HKT
Install Date : Thu 09 Feb 2012 09:29:53 PM HKT
Install Reason : Explicitly installed
Install Script : No
Description : An enhanced Interactive Python shell.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
It seems to be incompatability issue with the modern ipython, see https://github.com/ipython/ipython/issues/286 for details.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Also see http://wiki.ipython.org/Cookbook/Updating_code_that_uses_IPython_for_0.11
Last edit: Anonymous 2013-05-07
I also encountered this problem and wrote a patch to fix it. Not sure, how I can sent it on to you? I just copy it and paste below for now:
diff --git a/python/interactiveBindings.py b/python/interactiveBindings.py
index 43b4548..28fa073 100755
--- a/python/interactiveBindings.py
+++ b/python/interactiveBindings.py
@@ -386,32 +386,46 @@ def autoipython(funcs):
# Use IPython in combination with AUTO
# First import the shell class
try:
- import IPython.Shell
- except:
- print("Sorry, ipython is not available on this system.")
- return
-
- import IPython
- from IPython.iplib import InteractiveShell
-
- # Now create an instance of the embeddable shell. The first argument is a
- # string with options exactly as you would type them if you were starting
- # IPython at the system command line. Any parameters you want to define for
- # configuration can thus be specified here.
-
- args = ['-pi1','AUTO In [\\#]: ',
- '-pi2','AUTO .\\D.: ',
- '-po','Out[\#]: ',
- '-noconfirm_exit',
- '-autocall','2']
-
- banner = ['Python %s\n'
- 'Type "copyright", "credits" or "license" '
- 'for more information.\n'
- % (sys.version.split('\n')[0],),
- "IPython %s -- An enhanced Interactive Python."
- % (IPython.Release.version,),
- """? -> Introduction to IPython's features.
+ try: # Check for ipython >= 0.11
+ from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
+ from IPython.config.loader import Config
+ cfg = Config()
+ cfg.PromptManager.in_template="AUTO In [\\#]: "
+ cfg.PromptManager.in2_template="AUTO .\\D.: "
+ cfg.PromptManager.out_template="Out[\#]: "
+ cfg.InteractiveShell.confirm_exit = False
+ cfg.InteractiveShell.autocall = 2
+ cfg.InteractiveShell.banner2 ="""
+Welcome to the AUTO IPython CLUI
+man -> List of AUTO CLUI commands"""
+
+ ipshell = TerminalInteractiveShell(config = cfg, user_ns = funcs )
+ ipshell.show_banner()
+ ipshell.mainloop()
+
+ except ImportError:
+ import IPython.Shell
+ import IPython
+ from IPython.iplib import InteractiveShell
+
+ # Now create an instance of the embeddable shell. The first argument is a
+ # string with options exactly as you would type them if you were starting
+ # IPython at the system command line. Any parameters you want to define for
+ # configuration can thus be specified here.
+
+ args = ['-pi1','AUTO In [\\#]: ',
+ '-pi2','AUTO .\\D.: ',
+ '-po','Out[\#]: ',
+ '-noconfirm_exit',
+ '-autocall','2']
+
+ banner = ['Python %s\n'
+ 'Type "copyright", "credits" or "license" '
+ 'for more information.\n'
+ % (sys.version.split('\n')[0],),
+ "IPython %s -- An enhanced Interactive Python."
+ % (IPython.Release.version,),
+ """? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
@@ -419,23 +433,26 @@ object? -> Details about 'object'. ?object also works, ?? prints more.
Welcome to the AUTO IPython CLUI
man -> List of AUTO CLUI commands"""]
- class AUTOInteractiveShell(AUTOInteractive,InteractiveShell):
- def __init__(self,name,**kw):
- self.parentclass = InteractiveShell
- AUTOInteractive.__init__(self, kw["user_ns"], None)
- InteractiveShell.__init__(self,name,**kw)
-
- def prefilter(self,line,continue_prompt):
- if not continue_prompt:
- line = self.processShorthand(line)
- line = InteractiveShell.prefilter(self,line,continue_prompt)
- return line
+ class AUTOInteractiveShell(AUTOInteractive,InteractiveShell):
+ def __init__(self,name,**kw):
+ self.parentclass = InteractiveShell
+ AUTOInteractive.__init__(self, kw["user_ns"], None)
+ InteractiveShell.__init__(self,name,**kw)
+
+ def prefilter(self,line,continue_prompt):
+ if not continue_prompt:
+ line = self.processShorthand(line)
+ line = InteractiveShell.prefilter(self,line,continue_prompt)
+ return line
+
+ ipshell = IPython.Shell.IPShell(args,
+ user_ns = funcs, user_global_ns = funcs,
+ shell_class = AUTOInteractiveShell)
+ ipshell.IP.user_ns['help'] = ipshell.IP.help
+ ipshell.mainloop(banner = '\n'.join(banner))
+ except ImportError:
+ print("Sorry, ipython is not available on this system.")
- ipshell = IPython.Shell.IPShell(args,
- user_ns = funcs, user_global_ns = funcs,
- shell_class = AUTOInteractiveShell)
- ipshell.IP.user_ns['help'] = ipshell.IP.help
- ipshell.mainloop(banner = '\n'.join(banner))
def automain(name=None):
import AUTOclui