Windows Environment Installation Python
1. Download the window installation package on the Python website
https://www.python.org/downloads/
2 Download python3.6.4 version
3. Install the Python3, basically is the next step in place.
To be able to use Python quickly in DOS mode, you need to set environment variables
In My Computer-Properties-Advanced system settings-environment variables, if you do not have the PATH variable name, add the path variable name and fill in the Python installation path to the variable value, if there are different programs, separated by semicolons
Authentication in DOS mode, just type Python to use
Linux Environment Installation Python3
Environment is centos6.4
1. Install the required dependency packages
[email protected] ~]# Yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-deve L Gdbm-devel db4-devel Libpcap-devel Xz-devel
2. Download the python3.5 source package and compile
[Email protected] tools]# wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
[Email protected] tools]# Tar XF python-3.5.0.tgz
[Email protected] tools]# CD Python-3.5.0
[Email protected] python-3.5.0]#/configure--prefix=/usr/local--enable-shared
[[email protected] python-3.5.0]# make && make install
[Email protected] python-3.5.0]# ln-s/usr/local/bin/python3/usr/bin/python3
Before running Python, you need to configure the library:
[Email protected] python-3.5.0]# echo/usr/local/lib >>/etc/ld.so.conf.d/local.conf
[Email protected] python-3.5.0]# Ldconfig
Run Python
[[email protected] python-3.5.0]# Python
Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "Help", "copyright", "credits" or "license" for more information.
>>>
[Email protected] python-3.5.0]# python3-v
Python 3.5.0
General use of Pycharm
The most commonly used Python editor under window is Pyhcharm, which describes the general use of pycharm below.
The specific installation procedure is relatively simple, this is omitted
1. After the installation is complete, the new project
2. Create a new Python file that will automatically generate a. py file
Common settings
1. When we use Pycharm to create a new Python file, we want to automatically generate the Python parser, character encoding and other information, you can set the template in Settings-Editor-File and Code templtes
#!/usr/bin/env python
#-*-Coding:utf-8-*-
# @Time: ${date} ${time}
# @Author: Zhangsan
# @File: ${name}.py
2. Set the font size
Common shortcuts
① use Ctrl+shift+f to quickly search for code keywords
② using Ctrl+shift+n to find file names quickly
③ using crtl+/Quick Comment code
④shift+enter quickly switch the next line
⑤ using debug F7 can go into the called function F8 skip F9 Skip to the next breakpoint
⑥ctrl+alt+i Auto Indent
Installing Python in Linux and the Windows environment, general use of Pycharm