pip install wheel version from private github repo

孤者浪人 提交于 2020-05-11 23:38:31

问题


I've packaged my private repo into a wheel. There are different versions of the wheel. Is it possible to install a specific wheel version of the repo using pip from the command line and via the requirements.txt file? This feature isn't mentioned in the pip documentation from what I can tell.

I can install a pip package from a private repository with no problem, using a Github token.

pip install git+https://$GITHUB_TOKEN@github.com/[username]/[reponame].git

I can also install a private pip package with a specific commit:

pip install git+https://$GITHUB_TOKEN@github.com/[username]/[reponame].git@[commit_sha]


回答1:


If you want to install a specific wheel, you give pip the path or URL for that wheel:

pip install https://example.com/url/of/wheel.whl


来源:https://stackoverflow.com/questions/51181840/pip-install-wheel-version-from-private-github-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!