目录
- 开发环境和工具
- python工具
- 安装python
- 包管理:pip
- 虚拟环境:virtualenv,virtualenvwrapper
- python版本管理:pyenv
- 远程部署工具:fabric
- Python分布式任务队列:celery
- 编码格式,语法检测
- pdb(调试器)
- pythonIDE:2.pycharm
- python tutor:可视化执行pythonhttp://www.pythontutor.com/visualize.html#mode=edit
- linux系统
- 快速启动工具:cerebro,Lauunchy(没用过),albert安装:
- 命令行工具:zsh配置oh my zsh
- 编辑器:vim
- 通用
- 版本管理:git
- python工具
开发环境和工具
python工具
安装python
$ wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
$ tar xvzf Python-2.7.9.tgz
$ cd Python-2.7.9
$ LDFLAGS="-L/usr/lib/x86_64-linux-gnu" ./configure --prefix=/opt/python2.7.9
$ make
$ sudo make instal
Python 将被安装到 /opt/python2.7.9/bin,通过创建虚拟环境时--python=/usr/bin/python3.5 --python参数指定版本路径
包管理:pip
虚拟环境:virtualenv,virtualenvwrapper
+ 安装:apt install virtualenv
+ 创建环境在当前目录下:virtualenv huanjing_name(路径中不要包括中文,否则会有ERROR: virtualenv is not compatible with this system or executable)
+ 创建环境:virtualenv huanjing_name
+ 激活环境:source huanjing_name/bin/activate
+ 退出:deactivate
python版本管理:pyenv
远程部署工具:fabric
Python分布式任务队列:celery
编码格式,语法检测
+ flake8,PyLint,pep8
+ flake8:flake8 name.py
+ PEP 8:
pdb(调试器)
+ import pdb;pdb.set_trace() 引入pdb代码片段,不需要时,可以注掉
pythonIDE:2.pycharm
+ 下载:
+ 解压:`tar -xvzf pycharm-community-2017.2.3.tar.gz -C ~`~即为文件解压路径
+ 运行:进入bin目录:`sh pycharm.sh &`
+ 激活码:`http://idea.lanyus.com/`
+ 修改hosts文件:`sudo vim /etc/hosts`中添加`0.0.0.0 account.jetbrains.com`
python tutor:可视化执行pythonhttp://www.pythontutor.com/visualize.html#mode=edit
linux系统
快速启动工具:cerebro,Lauunchy(没用过),albert安装:
+ 网址:https://albertlauncher.github.io/docs/installing/
+ 导入秘钥文件:
```
wget -nv -O Release.key https://build.opensuse.org/projects/home:manuelschneid3r/public_key
apt-key add - < Release.key
apt-get update
```
+ 安装:
```
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/home:manuelschneid3r.list"
sudo apt-get update
sudo apt-get install albert
```
+ 快捷键:linux系统键盘 ,快捷键设置,命令:albert show
命令行工具:zsh配置oh my zsh
+ 安装zsh:sudo apt-get install zsh
+ 安装oh my zsh:`sh -c "$(curl -fsSL [https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"](https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)%22)`
或sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
+ 替换bash:chsh -s /bin/zsh
+ 插件:https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins-Overview