Home >Backend Development >Python Tutorial >Graphical introduction to the steps to build a python development environment
Although there are many pythondevelopment environment construction articles on the Internet, it is still necessary to reinvent the wheel. Record the process to facilitate your own configuration in the future and to facilitate learning. Colleagues in configure their environment.
1. Get ready to install the package
## 1) Go to the python official website to download the python operating environment (https:// www.python.org/downloads/), currently the more stable one is python-3.5.2
2) Download the latest version of IDE from the pycharm official website (http://www.jetbrains .com/pycharm/download/#section=windows), the official website provides three versions of mac, windows and linux. I downloaded pycharm-community-2016.2.3.exe
2. Install the software
1) Install the python operating environment
Double-click python-3.5.2.exe
It is generally better to use customized installation, otherwise the automatic installation will install the environment into the personal directory, and sometimes it is very difficult to find it. Trouble
In addition, check the check mark in front of the second red box, otherwise you need to manually add python installation in the path of windows environmentvariable Path
Here, manually modify the installation path. You can install it to the C drive or the D drive.
##
Complete the installation
Then we open CMD and enter python in it. You can enter the encoding directly
We can enter
print('hello world!') to test the python operation, as shown below
If you enter python, the following error appears
Then you have to manually add the python installation path to the system environment variable
Open the start menu and right-click the computer = "
## After selecting, click Edit and add at the end; C:\Python\Scripts\;C:\Python\; This is the installation path just now Then open a new CMD (you need to open a new cmd to be effective), enter python and you can see the prompt to enter the coding interface 2) Install pycharm development IDE Double-click pycharm-community-2016.2.3.exe, generally Just follow the normal default installation items Here is the selection of IDE Generally speaking, when editing the interface skin, using gray text on a black background will look less dazzling and easier on the eyes. You can also set it later after selecting it here. The installation was successful after submission. Download a Chinese package online and rename it resources_cn.jar, and then copy it directly to the installation In the lib folder under the path, reopen the IDE and the Chinese version will be automatically restored. # To configure the editing interface skin, you can configure it as follows. Generally, the font will be smaller by default, but it can also be modified to be larger according to the configuration below. The list item selection here can use different skins When using the default item, the font size cannot be modified directly. Click Save As... and you can modify it after saving as. After saving as, you can modify it directly now 3. Install python Kind of package There are two ways to install the package, one is to use the command line, the other is to choose the IDE to install 1) Command line Installation method Open cmd, enter pip install flask (the name of the package you want to install), press Enter to start the installation Wait for a while and the installation will be successful General We need to upgrade pip to the latest version, which can reduce the occurrence of installation problems Enter the following command in cmd, and the pip upgrade will be started We enter: pip --version in cmd to see the current pip version In case the pip upgrade fails, don’t be afraid, you can go to the python official website to download the installation package for installation and upgrade In browsing Enter in the server address bar: https://pypi.python.org/pypi/pip Download the installation package, And extract it to the root directory of drive C Enter the following command under DOS, enter the pip-9.0.1 folder, and then enter: python setup.py install to enter pip installation Complete the pip upgrade operation 2) IDE installation method Open the IDE and click: File => Default Settings Then select Project Interpreter, you can see the list of installed python packages, click + in the upper right corner to enter the installation package selection interface Enter the name of the package you want to install in the search box at the top, you can search for the installation package, then select it, click Install Package in the lower left corner, and the IDE will start downloading Installed. If the installation fails due to network reasons, you can click on other items and then click back, and then click Install. After several times, the installation can be successful. After repeated attempts, the installation still cannot be successful. You can click to view the cause of the error, or you can Use the command mode to directly see the cause of the error. After completing the above operations, you can start developing pythont programspip install https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
The above is the detailed content of Graphical introduction to the steps to build a python development environment. For more information, please follow other related articles on the PHP Chinese website!