Install python package management tools

1. Install setuptools

Download the zip file: setuptools-38.5.1.zip , extract it on your local disk.

 In the unzipped directory you will see the setup.py file, which we need to execute.
Enter the cmd command window, enter the directory you just decompressed, and execute the command:
python setup.py install
After installation, the Scripts directory will appear in the python installation directory, which contains easy_install.exe and pip.exe, which proves that the installation has been successful.
2. Configure environment variables
Add the Scripts directory, such as D:\Tools\Python27\Scripts, to the environment variable Path.
This way we can use easy_install or pip to install the python third-party modules we need.
3. Three-party module installation test
cmd command window execution: pip install xlwt We can use xlwt in the code, import xlwt
Finally, attach the help of pip: https://pip.pypa.io/en/stable/user_guide/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326350172&siteId=291194637