Environment Setup
Python x.x + Python x.x-dev + setuptools + pip + [virtualenv, distribute]
* Ubuntu 16.x 自带 Python3 和 pip
- Python:
- Python-dev:
- sudo apt-get install python2.7 python2.7-dev
- * Python开发环境,方便今后编译其他扩展库.
- Python.h is nothing but a header file. It is used by gcc to build applications. Youneed to installa package calledpython-dev. This packageincludes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications.
- setuptools:
- wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
- python ez_setup.py --user
- pip: Python 的包管理工具
- sudo apt-get install python-pip
- pip documentation
- http://blog.csdn.net/kingppy/article/details/13080919
- virtualenv: Python 多版本管理的利器 (待学习)
- sudo pip install virtualenv
- to be continued
- sudo pip install virtualenv
- distribute :
- git
- git flow
- bash-it
- vim
Text Editor
Sumlime Text
- 安装,有PPA可用,打开终端,输入以下命令:
- sudo add-apt-repository ppa:webupd8team/sublime-text-3
- sudo apt-get update
- sudo apt-get install sublime-text-installer
- 卸载 sublime text 命令:
- sudo apt-get remove sublime-text-installer
Package Control:
在浏览器进入 Sublime Text 官网,选择适合的版本下载安装。
- 安装Sublime Text的Package Control。安装细节参见 Sublime Packages 安装。 最后,按快捷键Ctrl+Shift+P调出命令窗口,选择Package Control: Install Package.
- Sublime Text Configuration settings
- My setting: ST3_User preference_setting
- 参考文章: 将Sublime Text 3设置为Python全栈开发环境
- Theme:
- Theme-Soda
- Theme-itg.flat
- Python 开发常用的插件:
- BracketHighlighter
- Anaconda (AutoCompletion / Code Linting (PEP8) / Go to Definitions/ Find Usage / Show Documentation)
- Autocompletion on dot, 输入dot . 就会跳出Documentation
- Go to Definitions: Ctrl + Alt + G: 跳到光标所在文件
- Find Usages: Windows: Ctrl + Alt + F. Linux: Super + F
- Display Signatures:
- Testing: 待学习
- Linter设置, 待学习
- Djaneiro待学习
- Sumlime Linter 待学习
- AdvancedNewFile(待学习): plugin allows for faster file creation within a project.
- ctrl+alt+n: create new files.
- ctrl+shift+alt+n: In addition to creating the folders specified, new folders will also contain an __init__.py file.
- GitGutter 待学习
- Emmet: 创建HTML/CSS代码块. 待学习
- 常用快捷键:
- Ctrl + P: 跳转到文件
- Ctrl + G: 跳转到行
- Ctrl + R: 列出文件中所有函数或类
- Ctrl + Shift + K: 删除当前行
- *多重编辑;
1.选定一个单词,点击 **“Ctrl+D”** 来选择同样的单词,再次点击 **“cmd+d”** 继续选择下一个单词… 2.或者 **“cmd+单击”** 来指定多个你想要同时修改的地方。
*更多快捷键参考:Sublime Documentation
- tar.xz, tar.gz, etc.
Python Library/Module
Dependencies: Numpy, SciPy, freetype,libpng, python x.x-dev
1. Install freetype
- Download: tar.gz package
- tar -zvxf [package name]
- make
- make install
2. Install libpng: sudo apt-get install libpng-dev
3. Install Matplotlib with pip : sudo pip install matplotlib