Foreword
The text of text and images from the network, only to learn, exchange, not for any commercial purposes, belongs to original author, if any questions, please contact us for treatment.
Author: Shan Hai Jieke level z
PS: If necessary Python learning materials can be added to a small partner click on the link below to obtain their own http://t.cn/A6Zvjdun
Development environment to build
A, Python environment installed
From https://www.python.org/downloads/ you download the appropriate installation package for your platform, my side is python3.6.6 download version under the MAC.
Installation packages list the following figure appears after clicking:
I downloaded python-3.6.6-macosx10.9.pkg, double-click the installation package pkg, the next step has been installing in the end, after installation open the terminal and type python:
If the following screen appears to explain python has been installed successfully.
python environment installed, install the Windows environment, too, there are questions you can contact me.
So that you can operate in a python console, such as the one to say import this, we'll look at:
Another egg, you can enter import antigravity try, ha ha.
Two, pip installation
python has a very convenient package management system, there are a lot of tripartite libraries and packages available, which will bring us great convenience, which we would like to thank the producers of these three parties modules.
Pip which is the package download tool, Python 3.4+ or later comes with pip tool, free to download and install other versions: https: //pypi.org/project/pip/
You can determine whether you have installed with the following command:
pip --version
The most commonly used commands pip
pip --version
Getting Help
pip --help
Upgrade pip
pip install -U pip
If this upgrade command problems, you can use the following command:
sudo easy_install --upgrade pip
Installation package
pip install SomePackage # latest version pip install SomePackage == 3.1.2 # specified version pip install 'SomePackage> = 2.0.0' # minimal version
Upgrade package
pip install --upgrade SomePackage
Upgrade package specified by using ==,> =, <=,>, <to specify a version number.
Uninstall package
pip uninstall SomePackage
Search package
pip search SomePackage
Shows the installation package information
pip show
View details specified package
pip show -f SomePackage
List installed packages
pip list
Check scalable package
pip list -o
Third, development tools
In fact, without any other python development tools, it is also possible, but inefficient. We still have to pursue programming efficiency and programming experience.
There are a lot of python development tools, the following several common:
1) Pycharm: JetBrains produced, which also produced the IntelliJ IDEA is the Java development tools, the company produced very famous tool, but also very easy to use, but the professional version should be charged. But there is community edition is free, basically meet the general developer. Download: https: //www.jetbrains.com/pycharm/download/
2) sublime Text: This is can be configured to python development environment, but developers who use front-end may be more accustomed to this, because of the use of this tool more front-end developers. This tool has a highly flexible configuration options, but novice would be too accustomed to. Download: http: //www.sublimetext.com/3
3) Visual Studio Code: This is produced by Microsoft's open source programming tools to support python, c / c ++, java and other languages, can be supported by the development of a variety of languages installed plug-ins. Before I used pycharm to develop python program, I still feel very perfect. I think this year vs code (Visual Studio Code for short) have not used, want to try it, the feeling after use can still have a fresh feeling. Download: https: //code.visualstudio.com/
Installation vs code:
Download the installation package VSCode-darwin-stable.zip, after extracting file that Visual Studio Code.app, Mac inside direct copy this file to the application directory on the line.
After installing restart inside the icon:
Open vs code:
Life is short, I use python!
2020 Latest Python Tutorial:
If you want to learn Python in or are learning Python, Python tutorial lot of it, but it is up to date?
Maybe you learn what may be the school two years ago, people had content, in this small series to share the latest wave of 2020 Python tutorial.
These tutorials have been small series for everyone packed and ready, I hope you're learning to help!