ipython

作者: 心疼你萌萌哒 | 来源:发表于2018-07-17 16:40 被阅读0次

安装

使用 root 用户执行
1. 配置 pip3 使用本地源
       mkdir ~/.pip
       vi ~/.pip/pip.conf
   写入如下内容:
       [global]
       index-url=https://mirrors.aliyun.com/pypi/simple
       [list]
       format=columns

安装ipython

pip3 install ipython

1.执行 shell 命令

In [1]: !pwd
/home/shark

In [2]: pwd
Out[2]: '/home/shark'

In [3]: cd /tmp  # 切换目录不需要使用感叹号 !
/tmp

In [4]: pwd
Out[4]: '/tmp'

In [5]: !cd /home/shark

In [6]: pwd
Out[6]: '/tmp'

2. 运行 python 脚本

In [7]: !vi hello.py
 In [8]: %run "./hello.py"   # 注意文件的路径
 hello world

相关文章

网友评论

      本文标题:ipython

      本文链接:https://www.haomeiwen.com/subject/halgpftx.html