3

私は Python が初めてで、Win7 マシンで IPython (numpy/scipy パッケージも) を適切に動作させるのに苦労しています。私は Python3.3 をインストールしており、IDLE は動作します。コマンド "ipython3" だけで ipython 環境が起動しますが、ノートブックを起動できません。次のエラー メッセージが表示されます。助けていただければ幸いです。

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
4

1 に答える 1

3

Windows 上の Python 3 に pexpect をインストールしました。これには 2 つの問題があります。

  • pexpect は Python 3 では動作しません
  • pexpect は Windows では動作しません

pexpect ( pip uninstall pexpect) をアンインストールする必要があります。Python 3 で pexpect 機能が必要な場合は、Python 3 互換のフォークpexpect-uが必要ですが、これは Windows には適用されません。

于 2013-03-01T02:06:06.207 に答える