2.2.14. Recommended Python development tools¶
Below are several recommended programs for developing Python code:
Text editors
Interactive Python shells
Integrated development environments (IDEs) with debuggers
Test runners
Test coverage tools
Profilers
Documentation generation
Installing packages
Packaging code
2.2.14.1. Installation¶
2.2.14.1.1. Python¶
Execute the following command to install Python 2 and 3:
apt-get install python python3
2.2.14.1.2. Pip package manager¶
Execute the following command to install the pip package manager:
apt-get install python-pip python3-pip
2.2.14.1.3. ipython interactive shell¶
Execute the following command to install the ipython interactive shell:
apt-get install ipython ipython3
2.2.14.1.4. Sublime code editor¶
Execute the following command to install the Sublime code editor:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
We also recommend editing the following settings:
Preferences >> Key Bindings:
[ { "keys": ["ctrl+shift+r"], "command": "unbound"} ]
Preferences >> Package control >> Install package >> AutoPEP8
Preferences >> Package settings >> AutoPep8 >> Settings-User:
[{"keys": ["ctrl+shift+r"], "command": "auto_pep8", "args": {"preview": false}}]
2.2.14.1.5. PyCharm IDE¶
Execute the following command to install the PyCharm IDE:
mv ~/Downloads/pycharm-community-2017.1.tar.gz /opt/
tar -xzf pycharm-community-2017.1.tar.gz
cd pycharm-community-2017.1
./pycharm.sh
We also recommend editing the following settings:
File >> Settings >> Tools >> Python Integrated Tools >> Default test runner: set to py.test
Run >> Edit configurations >> Defaults >> Python tests >> py.test: add additional arguments “–capture=no”
Run >> Edit configurations >> Defaults >> Python tests >> Nosetests: add additional arguments “–nocapture”