The Windows system installs the Python interpreter first:
Windows version exe installation file: Https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi
Linux version exe installation file https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
Install next next know to finish
Configuring Environment variables
Then type python-v on the cmd command line to get the Python version information. Installation Complete
Install PIP
Download pip:https://pypi.python.org/pypi?:action=show_md5&digest=87083c0b9867963b29f7aba3613e8f4a
After the download has been unpacked, open the Extract directory, address bar cmd execute command: Python setup.py install
After the installation is complete, go to the Python installation directory, for example: D:\Program_Files\d-Ear\Python\Scripts Configuration to environment variables
The PIP list will be able to view the installation information.
Pip Common commands:
List installed Packages
pip freeze
or pip list
Export Requirements.txt
pip freeze > <目录>/requirements.txt
installation package Online Installation
pip install <包名>
or pip install -r requirements.txt
Specify the version by using = = >= <= > <, and install the latest version without writing
The Requirements.txt content format is:
Apscheduler==2.1.2django==1.5. 4mysql-connector-python==2.0. 1mysql-python==1.2. 3pil==1.1. 7south==1.0. 2django-grappelli==2.6. 3django-pagination==1.0. 7
Install the Local installation package
pip install <目录>/<文件名>
or pip install --use-wheel --no-index --find-links=wheelhouse/ <包名>
< package name > previous space
can be shortened to
pip install --no-index -f=<目录>/ <包名>
Uninstalling packages
pip uninstall <包名>
or pip uninstall -r requirements.txt
Upgrade Package
pip install -U <包名>
Or: Pip Install < package name >--upgrade
Upgrade Pip
pip install -U pip
Show the directory where the package resides
pip show -f <包名>
Search Packages
pip search <搜索关键字>
Querying packages that can be upgraded
pip list -o
Download the package without installing
pip install <包名> -d <目录>
or pip install -d <目录> -r requirements.txt
Packaged
pip wheel <包名>
PIP Replacement Software Image source
Install PIP source under Windows
Create a PIP directory directly in the user directory, such as: C:\Users\xx\pip, new file Pip.ini:
[Global]
Timeout = 6000
Index-url =http/pypi.douban.com/simple
Trusted-host =http/pypi.douban.com There is also a version
- Users who use the PIP can be configured as follows:
- In Unix and MacOS, the configuration file is: $HOME/.pip/pip.conf
- On Windows, the configuration file is:%home%\pip\pip.ini
- You need to add the following in the configuration file:
- [Global]
- Index-url=http://mirrors.tuna.tsinghua.edu.cn/pypi/simple
Python Windows installation pip