配置 python 常用环境
在开始学习 Python 之前,需要先配置好 Python 的常用环境, 这可能是个
先有鳮,还是先有蛋
的事儿, 但是,就是这么任性!
安装Ipython
什么是 Ipython?——来自 Ipython 的 wiki。
IPython是一种基于Python的交互式解释器。相较于原生的Python Shell,IPython提供了更为强大的编辑和交互功能。
使用 pip 命令安装 Ipython
pip install ipython
悲剧,出现错误提示。
bash-3.2# pip install ipython The directory '/Users/zhulijian/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/zhulijian/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
貌似是
Caches
这个文件夹的权限问题,绕过(简直无情+无耻)。搜索到,可以通过 git clone 库之后执行
setup.py install
的命令安装。- 1.执行
git clone https://github.com/ipython/ipython.git
- 2.执行
cd ipython
进入ipython
文件夹 - 3.执行
sudo python setup.py install
进行安装
- 1.执行
成功(默默的在笔记本的 Ipython 前打个勾 √ )