Ubuntu 14.04 LTS Python 2.7.6
Only use "sudo ipython" can open ipython, install by "sudo apt-get install ipython"
Traceback (most recent call last):
File "/usr/bin/ipython", line 6, in
start_ipython()
File "/usr/lib/python2.7/dist-packages/IPython/init.py", line 118, in start_ipython
return launch_new_instance(argv=argv, *_kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 545, in launch_instance
app.initialize(argv)
File "
File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 323, in initialize
self.init_shell()
File "/usr/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 339, in init_shell
ipython_dir=self.ipython_dir, user_ns=self.user_ns)
File "/usr/lib/python2.7/dist-packages/IPython/config/configurable.py", line 349, in instance
inst = cls(_args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.py", line 320, in init
*_kwargs
File "/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 456, in init
self.init_history()
File "/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 1480, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "/usr/lib/python2.7/dist-packages/IPython/core/history.py", line 481, in init
self.new_session()
File "
File "/usr/lib/python2.7/dist-packages/IPython/core/history.py", line 65, in needs_sqlite
return f(self, *a, *_kw)
File "/usr/lib/python2.7/dist-packages/IPython/core/history.py", line 499, in new_session
NULL, "") """, (datetime.datetime.now(),))
OperationalError: attempt to write a readonly database
Did you get this with sudo ipython
or ipython
? What is the result of ipython locate
?
Does $(ipython locate)/profile_default
have history.sqlite with the wrong rights ? (if so delete it & retry; or change permissions/owners)
Same as above with sudo ipython locate
if it did not work.
We do not maintain the debian/ubuntu package, so if this is due to the way apt install it, there is nothing we can do here.
It start working by excute:
chown -R user-name:root ~/.ipython
_thank you!_
chown -R user-name:user-name ~/.ipython
maybe ? Don't see any reason the group should be root...
Happy hacking.
Yes, Thank you!
Most helpful comment
It start working by excute:
_thank you!_