Windows install pip

pip is a very convenient python package management tool. This article mainly introduces the method of installing pip under windows 10.

1. Download the pip
address: https://pypi.python.org/pypi/pip#downloads Pay
attention to select the tar.gz compressed package, the latest version is 9.0.3, the version selected here is: pip-9.0.3.tar .gz (md5, pgp)

2. Unzip and install
the downloaded compressed package to the working directory (such as D:\), open Windows cmd, and run the following command to enter the unzipped pip directory

Use the following command to install
python setup.py install

3. Add environment variables
to add windows system environment variables, the same
as my python directory is: D:\Python27\;
then add the following two directories to the system environment variables: D:\Python27\; D:\Python27\Scripts;

4. After the pip common command
is installed successfully, re-enter CMD and run pip, you can see the help document:

The common commands of pip are as follows:

#Installation package
pip install xxx

#Upgrade package, you can use -U or --upgrade
pip install -U xxx

#uninstall package
pip uninstall xxx

#List installed packages
pip list

5. Common problems
Recently, I encountered an error AttributeError: 'module' object has no attribute 'wraps' when using the pip command. It was found that the installation version of pip was wrong. Use the above method to reinstall the latest version of pip to solve it.





Guess you like

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