-
-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: add index_url paramter for setup env #6289
Feat: add index_url paramter for setup env #6289
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use a pip conf file to change that setting globally:
https://pip.pypa.io/en/stable/topics/configuration/
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
Putting this in /etc/pip.conf should affect all uses of pip, not just package management. Have you tried a conf file?
@@ -29,3 +29,9 @@ | |||
required: false | |||
description: Action timeout in seconds. Action will get killed if it doesn't finish in timeout | |||
type: integer | |||
index_url: | |||
default: "https://pypi.org/simple" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default means all users that do not use this option will have -i https://pypi.org/simple
in the pip command which seems pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for clarification!
This PR addresses the issue that in some countries and regions, network restrictions can significantly slow down access to the official Python website, often resulting in timeouts. To solve this problem, I have added the option for users to customize the index_url during the setup_virtualenv process. For example, in China, users can use the https://pypi.tuna.tsinghua.edu.cn/simple source to download Python packages, instead of the default source provided by PyPI.