Ubuntu 14.04 LTS Python 2.7.6
只有使用“sudo ipython”才能打开ipython,通过“sudo apt-get install ipython”安装
回溯(最近一次通话最后):
文件“/usr/bin/ipython”,第 6 行,在
start_ipython()
文件“/usr/lib/python2.7/dist-packages/IPython/init .py ”,第 118 行,在 start_ipython
返回 launch_new_instance(argv=argv, *_kwargs)
文件“/usr/lib/python2.7/dist-packages/IPython/config/application.py”,第 545 行,在 launch_instance
应用程序初始化(argv)
文件 ”
文件“/usr/lib/python2.7/dist-packages/IPython/config/application.py”,第 89 行,在 catch_config_error
返回方法(应用程序,*args,*_kwargs)
文件“/usr/lib/python2.7/dist-packages/IPython/terminal/ipapp.py”,第 323 行,初始化
self.init_shell()
文件“/usr/lib/python2.7/dist-packages/IPython/terminal/ipapp.py”,第 339 行,在 init_shell
ipython_dir=self.ipython_dir, user_ns=self.user_ns)
文件“/usr/lib/python2.7/dist-packages/IPython/config/configurable.py”,第 349 行,例如
inst = cls(_args, *_kwargs)
文件“/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.py”,第 320 行,在init
*_kwargs
文件“/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.py”,第 456 行,在init
self.init_history()
文件“/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.py”,第 1480 行,在 init_history
self.history_manager = HistoryManager(shell=self, parent=self)
文件“/usr/lib/python2.7/dist-packages/IPython/core/history.py”,第 481 行,在init
self.new_session()
文件 ”
文件“/usr/lib/python2.7/dist-packages/IPython/core/history.py”,第 65 行,在 needs_sqlite
返回 f(self, *a, *_kw)
文件“/usr/lib/python2.7/dist-packages/IPython/core/history.py”,第 499 行,在 new_session
NULL, "") """, (datetime.datetime.now(),))
OperationalError:尝试写入只读数据库
你是用sudo ipython
还是ipython
得到的? ipython locate
的结果是什么?
$(ipython locate)/profile_default
的 history.sqlite 是否有错误的权利? (如果是这样,请将其删除并重试;或更改权限/所有者)
如果它不起作用,则与上面的sudo ipython locate
相同。
我们不维护 debian/ubuntu 软件包,所以如果这是由于 apt 安装它的方式,我们在这里无能为力。
它通过执行开始工作:
chown -R user-name:root ~/.ipython
_谢谢!_
chown -R user-name:user-name ~/.ipython
可能吗? 看不到任何理由该组应该是根...
快乐的黑客。
是的,谢谢!
最有用的评论
它通过执行开始工作:
_谢谢!_