-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
github action may fail when use the [package.source] in poetry.lock #2151
Comments
you can set mirror in pip config file like When poetry call pip to install packages, pip will try to install from mirror instead of pypi. There is no need to add source section in pyproject.toml |
Thanks for your reply. I have already set the $ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
Writing to /root/.config/pip/pip.conf
$ pip config get global.index-url
https://pypi.tuna.tsinghua.edu.cn/simple/ However, when I tried to use poetry to add a package, pip was still using I also tried to set mirror in pip config file like $ cat /etc/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/ Is there some way to know which pypi mirror that poetry was using? Besides, even I can set the pypi mirror, the Here are the version of poetry: $ poetry --version
Poetry version 1.0.5 |
no, pip is not using pypi. poetry is issuing http requests to pypi json api to resolve deps, that's why it's slow. I'm not sure if poetry could use json api of mirrors, looks like it could. I'm doing it this way but I can't find anything about my pypi mirror in my poetry.lock... |
So when I set pypi mirror in Here is a picture show how slow the poetry is, when I did set pypi mirror in I have never waited for the result, so I never saw the Meanwhile, If I set |
From pypi, because I often got requests failure exceptions showing host is pypi. |
I see! So poetry use pypi json api to resolve deps, and download packages from pypi mirror in Thanks for your time! I did start from an empty pyproject.toml and add the It is so frustrating, so I still have to set |
Related to #1632 |
@youngquan There is a PR that could help solve this issue. Would you be able to test it, give feedback? #3624 |
Closing as a specialized duplicate of #1632 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue
I am from China. Because
https://pypi.org/simple
is too slow for me to download package, I often use a pypi mirror. I add cofigurations below to speed up:Recently, I have used Poetry to manage a python project named goldenmask on Github. However, because the
poetry.lock
file was pushed to the repository,poetry install
would try to fetch packages from the pypi mirror located in China. These is unnecessary, and I have to delete the filepoetry.lock
and the cofigurations above, so github actions could work.This maybe unreasonable I think, so is there a better solution for developers in China? Could someone give me some advice?
The text was updated successfully, but these errors were encountered: