IPython Notebook с ScipySuperpack: отсутствует зависимость markupsafe

На Mac OSX 10.8.4. Я установил IPython через ScipySuperpack. Казалось, что это прекрасно.

Для запуска мне сказали ввести ipython notebook --pylab=inline в командной строке.

Однако я получаю следующую ошибку

Traceback (most recent call last): File "/usr/local/bin/ipython", line 8, in <module>
 load_entry_point('ipython==1.0.0-dev', 'console_scripts', 'ipython')() File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/__init__.py", line 118, in start_ipython
 return launch_new_instance(argv=argv, **kwargs) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 538, in launch_instance
 app.initialize(argv) File "<string>", line 2, in initialize File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 89, in catch_config_error
 return method(app, *args, **kwargs) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py", line 309, in initialize
 super(TerminalIPythonApp, self).initialize(argv) File "<string>", line 2, in initialize File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 89, in catch_config_error
 return method(app, *args, **kwargs) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/core/application.py", line 361, in initialize
 self.parse_command_line(argv) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py", line 304, in parse_command_line
 return super(TerminalIPythonApp, self).parse_command_line(argv) File "<string>", line 2, in parse_command_line File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 89, in catch_config_error
 return method(app, *args, **kwargs) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 468, in parse_command_line
 return self.initialize_subcommand(subc, subargv) File "<string>", line 2, in initialize_subcommand File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 89, in catch_config_error
 return method(app, *args, **kwargs) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/config/application.py", line 400, in initialize_subcommand
 subapp = import_item(subapp) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/utils/importstring.py", line 42, in import_item
 module = __import__(package, fromlist=[obj]) File "/Library/Python/2.7/site-packages/ipython-1.0.0_dev-py2.7.egg/IPython/html/notebookapp.py", line 38, in <module>
 from jinja2 import Environment, FileSystemLoader File "/Library/Python/2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/__init__.py", line 33, in <module>
 from jinja2.environment import Environment, Template File "/Library/Python/2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/environment.py", line 13, in <module>
 from jinja2 import nodes File "/Library/Python/2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/nodes.py", line 18, in <module>
 from jinja2.utils import Markup File "/Library/Python/2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/utils.py", line 520, in <module>
 from markupsafe import Markup, escape, soft_unicode ImportError: No module named markupsafe
</module></module></module></module></module></string></string></string></string></module>

Предложения о том, где я ошибся?

3 ответа

У меня возникла эта проблема после установки jupyter через pip install jupyter. Решение, которое сработало для меня, заключалось в том, чтобы загрузить markupsafe tarball непосредственно с https://pypi.python.org/pypi/MarkupSafe и установить через sudo python setup.py install.


У меня такая же проблема в моей недавно установленной ubuntu 14.04

Похоже, что pip install jinja2 пошла не так, решение для меня

pip uninstall jinja2
sudo apt-get install python-jinja2


Используя версию pip вашей установки ScipySuperpack, сделайте

pip install ipython[all]

Это должно исправить все зависимости.

licensed under cc by-sa 3.0 with attribution.