iPython的安装及问题解决

Reference: http://www.jianshu.com/p/8779eac7f313

 

有两种解决方法,第一种是从github下载5.X的源代码编译安装,另一种是指定ipython的版本【推荐】。先介绍第一种方式,源代码编译安装【来自于github官方指导】

wget https://codeload.github.com/ipython/ipython/zip/5.x -o ipython-5.x.zip
unzip ipython-5.x.zip
cd ipython-5.x
# The [test] extra ensures test dependencies are installed too:
pip install .[test]
#Do not invoke setup.py directly as this can have undesirable consequences for further upgrades. We do not recommend using easy_install either.
ln -sf /usr/local/bin/ipython /usr/bin/ipython
ipython -V

或者指定版本【推荐】

sudo pip install ipython==8888 #现指定一个不存在的版本以查看可用版本,发现5版本中有5.3.0(你的可能不一样)
sudo pip install ipython==5.3.0

如果你觉得查询版本号的方法太过于民科,请参考yolk3k 强大的Python管理工具

另外一种warning

/usr/local/lib/python2.7/site-packages/IPython/core/history.py:228: UserWarning: IPython History requires SQLite, your history will not be saved
  warn("IPython History requires SQLite, your history will not be saved")
Python 2.7.13 (default, May  8 2017, 04:15:39)

解决方案:
关于 ImportError: No module named _sqlite3 报错解决方法
problems with python 2.7.3 on Centos with sqlite3 module
No module named _sqlite3

sudo yum install sqlite-devel
sudo pip install pysqlite
作者:izhangxm
链接:http://www.jianshu.com/p/8779eac7f313
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
 
posted @ 2017-10-09 17:26  balmy233  阅读(959)  评论(0编辑  收藏  举报