Pip Local Source Authoring

Source: Internet
Author: User

PIP installation

[[email protected] ~]# Yum install-y python-pip # Install Pip[[email protected] ~]# mkdir-p/var/www/html/pypi/packages # Used to put a PIP bag


Pip Source Configuration

#  download first without installing a few packages into the/var/www/html/pypi/packages directory [[email protected]  ~]# pip -q install --no-install -i http://pypi.python.org/simple -d  /var/www/html/pypi/packages/ pypiserver  # pypi server[[email protected]  ~]# pip -q install --no-install -i http://pypi.python.org/simple -d  /var/www/html/pypi/packages/ salt-api  [[email protected] ~]# pip -q  install --no-install -i http://pypi.python.org/simple -d /var/www/html/pypi/ Packages/ pip2pi 
[Email protected] ~]# Ll/var/www/html/pypi/packages/total 576drwxr-xr-x 2 root root, April 18:21. Drwxr-xr-x 3 ro OT root APR 24 18:20. -rw-r--r--1 root root 86178 Apr 18:20 pypiserver-1.1.7.zip-rw-r--r--1 root root 495999 Apr 18:21 salt-api-0.8.4.1 . tar.gz

[[Email protected] ~]# pip help install # View the parameter options that can be taken after install [[email protected] ~]# pip install Pypiserver # If you have a Web server, such as Apache, Nginx, do not install this [[email protected] ~]# pip install Pip2pi # set up a reference [[email protected] ~]# dir2pi/var/www/html/pypi/ packages/# using DIR2PI to index [[email protected] ~]# yum install-y httpd[[email protected] ~]# service start httpd # start httpd service The default directory is under the/var/www/html directory


Pip Source Test

[[email protected] ~]# mkdir-p. PIP # set PIP source default location [[email protected] ~]# cat. pip/pip.conf [global]index-url=http: 192.168.141.249/pypi/packages/simple[[email protected] ~]# pip install Salt-api # Normal installation, test okdownloading/unpacking Salt-api


Reference links

Building the engine room operation and maintenance infrastructure (16): Building local PyPI

This article is from the "The-way-to-cloud" blog, make sure to keep this source http://iceyao.blog.51cto.com/9426658/1638128

Pip Local Source Authoring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.