"Life is short, I learn Python" personal study notes--set PIP and Easy_install using the specified source

Source: Internet
Author: User

最近在学习编写 setup.py ,同时有一个内部pypi源,希望用内部源而不是默认源。
在stackoverflow搜索到了,贴过来备忘。

方法如下:

for = http://localhost:8000/ for pip[global]index-url = http://localhost:8000/

Note: The value of Index_url does not require any quotation marks

Replace the Index-url value with the desired internal original address, in the format: http://${your_pip_server}/pypi/web/simple/

Write a more shell command, and later use the direct copy to execute:

# This assumes the server address is  test.iomy_svr="test.io"cat > ~/.pydistutils.cfg << eof[easy_install]index-url = http://${my_svr}/pypi/web/simple/EOF mkdir -P ~/.pip/cat > ~/.pip/pip.conf << eof[global]index-url = http://  ${my_svr}/pypi/web/simple/trusted-host = ${my_svr}eof

"Life is short, I learn Python" personal study notes--set PIP and Easy_install using the specified source

Related Article

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.