Tag: Image stat enters the latest version. COM source code mode installation Nload
First, install Python
1. Install under Linux
The general system is installed by default 2.6.6 version, upgrade to 2.7 version, but 2.6 can not be deleted, because the system is dependent on it, the Epel source of the latest is also the 2.6 version, so the source code to install the 2.7 version
Login to select the version of Linux to download https://www.python.org/downloads/source/
cd/usr/local/srcwgetHttps//www.python.org/ftp/python/2.7.14/Python-2.7.14.tgzTarZXVF python-2.7. -. TGZCD Python-2.7. -./configure--prefix=/usr/local/ Make&& Make InstallMV/usr/bin/python/usr/bin/python_2.6- OldLN-s/usr/local/bin/python/usr/bin/Pythonpython-V prints out 2.7Version
Yum will not be used after the operation, make the following settings for Yum to use version 2.6
vim/usr/bin/Yum#!/usr/bin/python changed to #!/usr/bin/python2. 6
Upgrade PIP, the default pip call after upgrading Python is 2.6, cannot be used, install the latest version of wget https://bootstrap.pypa.io/get-pip.py python get-pip.py2, Windows installation
Next Complete installation
Verify
Windows + R input cmd
Third, the use of Pycharm
1. Set the Python version of the call
File---Settings---project: Python _code---Project interpreter select the Python path that was installed in the previous step
2. Font settings
3. Set the Python file header
Click: File--Settings--editor--code style--file and code template--python Script Insert the following header
# !/usr/bin/env python # -*-coding:utf-8-*- # @Time : ${date} ${time}# @Author : Lingxiangxiang# @File : $ {name}.py
Effect:
4. Pycharm Set Python parameters
5, pycharm common shortcut keys
http://yangfangs.github.io/wiki/pycharm-Shortcut-key/
Ctrl + C //+ x //+ v //+ D //+ SHIF + N//+ shif + F //
+ mouse key //
forward, back + ALT + direction
left/right + A; Ctrl + ALT + L //
+ Enter //
+/ //Line comment/
uncomment tab+tab //Indent Backward
6. Python Run the program
Linux:chmod +x test.py &&./test.py | | Python test.py
Windows:cmd python test.py
Pycharm: Direct Click to run
7. Pycharm Debug Mode
Breakpoint: The program executes to this place to stop
F7: Enter into the code
F8: Skip to Next step
F9: Restore the program or execute to the next breakpoint
I. Getting started with Python installation and pycharm