在CentOS7下使用ipython时,发现一warning,提示无法保存历史记录,如下:
1 2 3 4 5 6 7 8 |
[root@MiWiFi-R3L-srv ~]# ipython /usr/local/lib/python3.6/site-packages/IPython/core/history.py:226: UserWarning: IPython History requires SQLite, your history will not be saved warn("IPython History requires SQLite, your history will not be saved") Python 3.6.6rc1 (default, Oct 6 2018, 11:37:19) Type 'copyright', 'credits' or 'license' for more information IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: |
此时如果我们会尝试安装sqlite-devel试图去解决这个问题,会发现问题依旧存在
解决方法:
安装好这些依赖的开发包后需要重新编译python
1 2 3 |
./configure make make install |
再次运行ipython
1 2 3 4 5 6 |
[root@MiWiFi-R3L-srv ~]# ipython Python 3.6.6rc1 (default, Oct 6 2018, 11:37:19) Type 'copyright', 'credits' or 'license' for more information IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: |
如果想赏钱,可以用微信扫描下面的二维码,一来能刺激我写博客的欲望,二来好维护云主机的费用; 另外再次标注博客原地址 itnotebooks.com 感谢!

😛