Specifying GitHub Source in requirements.txt
To integrate a library installed from a GitHub repository into your dependencies, modify your requirements.txt file as follows:
For GitHub repositories, omit the "package==version" naming convention. Instead, use the following format:
package-name @ git+git://github.com/owner/repo@reference
where "reference" can be:
Example:
To update the "package-two" dependency with a GitHub repository, use one of the following configurations in your requirements.txt:
package-two @ git+https://github.com/owner/repo@41b95ec package-two @ git+https://github.com/owner/repo@main package-two @ git+https://github.com/owner/[email protected] package-two @ git+https://github.com/owner/repo@releases/tag/v3.7.1
Note: In some pip versions, update the package version in the package's setup.py to avoid assuming the requirement is already met.
위 내용은 GitHub 저장소를 `requirements.txt`에 통합하는 방법은 무엇입니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!