之前一直是在Python2.7环境下装的ipython,今天想在Python3环境下安装,主要是为了方便测试,按tab键可以补全,显示导入模块的方法。
1.首先安装Python3.6.1
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz -P /usr/local/src/tar -zxvf Python-3.6.1.tar.xzcd Python-3.6.1./configure --prefix=/usr/local/python3make && make installln -s /usr/local/python3/bin/* /usr/local/bin/ (做软链)
2.安装ipython
wget https://pypi.python.org/packages/75/03/bb1ce0cf9f8a86f52b34090708e1806bc11e2d29b193e7d6fe0afe9a61e5/ipython-6.0.0.tar.gz#md5=4169cfe24253c342d7a0b966f5c76281 -P /usr/local/srctar -zxvf ipython-6.0.0.tar.gzcd ipython-6.0.0 python3 setup.py install
在命令行中输入 ipython3,会报错,提示需安装如下模块:
pip3 install traitlets pygments pexpect pickleshare prompt_toolkit simplegeneric
之后,基于python3中的ipython就安装好了