Detailed explanation of python Development Environment establishment, detailed explanation of python Establishment
Although there are a lot of articles on the Internet to build a python development environment, it is still necessary to record the process so that you can configure the environment in the future and help colleagues who are learning to configure the environment.
1. Prepare the installation package
1) download python Runtime Environment (http://www.bkjia.com/softs/416037.html) on the python official website, the current relatively stable is python-3.5.2
2) on the pycharm official website to download the latest version of IDE (http://www.bkjia.com/softs/299378.html, the official network of MACOs windows and linuxthree types, my next is pycharm-community-2016.2.3.exe
2. Install software
1) install the python Runtime Environment
Double-click python-3.5.2.exe
Generally, it is better to use custom installation, otherwise the automatic installation will install the environment in the personal directory, and sometimes it will be difficult to find out
In addition, the record at the front of the second red box is marked. Otherwise, you must manually add the python installation path to the path of the windows environment variable.
Here, manually modify the installation path. You can install it on drive C or drive D.
Complete installation
Then we open CMD and input python in it to directly enter the encoding.
We can enter print ('Hello world! ') To test python running, as shown in figure
If the following error occurs when you enter python
You must manually add the python installation path to the system environment variable.
Open the Start menu, right-click the computer, and choose => properties.
Click Edit, and add
; C: \ Python \ Scripts \; C: \ Python \;
This is the installation path just now
Then open the new CMD (the new cmd is valid only). Input python and you will see the prompt just now to enter the encoding interface.
2) install pycharm development IDE
Double-click pycharm-community-2016.2.3.exe. Generally, follow the normal default installation items.
Here is the IDE editing interface skin. Generally, the black-bottom gray text looks less eye-catching and eye-catching. You can set it later.
After submission, the installation is successful.
Chinese Method
Download a Chinese package online and rename it resources_cn.jar. Copy the package directly to the lib folder under the installation path. Then, open the IDE and then turn it into a Chinese package.
To cancel the Chinese version, you only need to delete the file and re-open the IDE to automatically restore the English version.
We recommend that you do not perform localization, because a feature cannot be used or clicked.
To configure and edit the interface skin, you can configure it as follows. Generally, the font size is relatively small by default. You can modify the font size as follows.
The list items here can use different skins
When the default item is used, the font size cannot be changed directly. Click Save As... to Save it.
Now you can directly modify it after saving it
3. install various python packages
There are two methods to install the installation package: Command Line and IDE installation.
1) command line installation method
Open cmd, enter pip install flask (the package name you want to install), and press enter to start installation.
After a while, the installation will be successful.
Generally, we need to upgrade pip to the latest version to reduce installation problems.
Enter the following command in cmd to start pip upgrade.
pip install https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
Enter pip -- version in cmd to view the current pip version.
In case of pip upgrade failure, you can go to the python official website to download the installation package for installation and upgrade.
Enter: https://pypi.python.org/pypi/pip in the browser address bar
Download the installation package and decompress it to the C root directory.
Enter the command in DOS, enter the pip-9.0.1 folder, and then enter python setup. py install to go to pip installation.
Complete pip upgrade
2) IDE Installation Method
Open IDE and click: File => Default Settings
Select Project Interpreter to view the list of installed python packages. Click + in the upper right corner to go to the installation package selection page.
Enter the name of the Package you want to Install in the search box on the top to search for the installation Package. Then, select the Package and click Install Package in the lower left corner. The IDE starts to download and Install the Package, if the installation fails due to network issues, click other items and click back. Then click Install. After multiple installation attempts, the installation is successful. After repeated installation attempts, the installation fails, you can click to view the cause of the error, or run the command to view the cause of the error.
After completing the above operations, you can start to develop the pythont program.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.