user2121812
user2121812

Reputation: 31

IPython notebook command returns errors

I'm new to Python and am struggling getting IPython (also numpy/scipy packages) to work properly on my Win7 machine. I have Python3.3 installed, IDLE works, the command "ipython3" alone starts the ipython environment, however I cannot get the notebook started. I get the following error messages. Help would be appreciated.

C:\Users\Emre> ipython3 notebook Traceback (most recent call last):   
File "C:\Python33\Scripts\ipython3-script.py", line 9, in <module> load_entry_point('ipython==0.13.1', 'console_scripts', 'ipython3')()   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\frontend\terminal\ipapp.py", line 388, in launch_ new_instance app.initialize()   
File "<string>", line 2, in initialize   File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\config\application.py", line 84, in catch_config_ error return method(app, *args, **kwargs)   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\frontend\terminal\ipapp.py", line 313, in initial ize super(TerminalIPythonApp, self).initialize(argv)   File "<string>", line 2, in initialize   
File   "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\config\application.py", line 84, in catch_config_ error return method(app, *args, **kwargs)   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\core\application.py", line 325, in initialize self.parse_command_line(argv)  
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\frontend\terminal\ipapp.py", line 308, in parse_c ommand_line return super(TerminalIPythonApp, self).parse_command_line(argv)   
File "<string>", line 2, in parse_command_line   
File   "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\config\application.py",   line 84, in catch_config_ error  return method(app, *args, **kwargs)   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\config\application.py", line 420, in parse_comman d_line  return self.initialize_subcommand(subc, subargv)   
File "<string>", line 2, in initialize_subcommand   
File   "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\config\application.py", line 84, in catch_config_ error   return method(app, *args, **kwargs)   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\config\application.py", line 352, in initialize_s ubcommand subapp = import_item(subapp)   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\utils\importstring.py", line 40, in import_item module = __import__(package,fromlist=[obj])   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\frontend\html\notebook\notebookapp.py", line 54, in <module>from .clustermanager import ClusterManager   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\frontend\html\notebook\clustermanager.py", line 2 7, in <module> from Python.parallel.apps.ipclusterapp import IPClusterStart   
File  "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\parallel\__init__.py", line 36, in <module>from .client.client import Client   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\parallel\client\client.py", line 46, in <module>from IPython.external.ssh import tunnel  
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\external\ssh\tunnel.py",  line 40, in <module>from IPython.external import pexpect   
File "C:\Python33\lib\site-packages\ipython-0.13.1-py3.3.egg\IPython\external\pexpect\__init__.py",   line 2, in <module>import pexpect  
File "C:\Python33\lib\site-packages\pexpect-2.4-py3.3.egg\pexpect.py", line 82  except ImportError, e: ^ SyntaxError: invalid syntax

Upvotes: 3

Views: 895

Answers (1)

minrk
minrk

Reputation: 38588

You have installed pexpect on Python 3 on Windows. There are two problems with this:

  • pexpect doesn't work on Python 3
  • pexpect doesn't work on Windows

You should uninstall pexpect (pip uninstall pexpect). If you want pexpect functionality in Python 3, then you need the Python 3-compatible fork pexpect-u, but this doesn't apply to Windows.

Upvotes: 3

Related Questions