Experiment report 1. Python installation and development environment construction

Experiment report 1. Python installation and development environment construction

1. Experimental purpose:

1. Proficient in the installation and basic usage of Python interpreter.

2. Be proficient in using the pip command to install Python extension libraries.

3. Be familiar with the method of offline installation of wheel files.

2. Experiment content:

1. Install the Python interpreter.

2. Install the Python extension library.

3. Experimental steps:

1. Open the official Python website http://www.python.org .

 

2. Download Python 3.7.4 or Python 3.6 and install at least one of them.

 

3. Find the successfully installed IDLE in the start menu and enter the following code) to ensure that IDLE is running normally.

   >>>print('Hello,world!')

 

4. Enter the scripts subdirectory of the Python installation directory in the resource manager , then press the Shift key, right-click in the blank space, and select "Open command window here" in the pop-up menu to enter the command prompt environment . as the picture shows:

 

5. Use the pip command to install the Python extension library numpy , pandas , scipy , matplotlib , jieba online .

openpyxl , pillow . The command to install openpyxl is as shown in the figure:

 

6. If you encounter an extension library that fails to be installed, use a browser to open the following URL to download the whl file for offline installation: https://www.lfd.uci.edu/~gohlke/pythonlibs/

Notes: 1) Select the correct version; 2) The file name cannot be modified when downloading; 3) Place the downloaded whl file in the Scripts folder under the python installation directory of the corresponding version, and execute pip offline installation extension in the folder Library.

如:pip install pygame-1.9.2a0-cp35-none-win_amd64.whl

7. Use import in IDLE of the corresponding version of python to import the installed extension library and verify whether the installation is successful. (The import method of pillow is import PIL)

 

8. Download and install Anaconda3, consult the information yourself and become familiar with the use of Jupter Notebook and Spyder, and be familiar with the method of using conda and pip to install extension libraries for the Anaconda environment. Refer to the previous steps.

 

Guess you like

Origin blog.csdn.net/m0_65168503/article/details/130325550