git repo 브랜치에서 pip install
하려고 하고 있다pip
특정 지점을 설치합니다.구글이 시키는 대로
pip install https://github.com/user/repo.git@branch
지점 이름은issue/34/oscar-0.6
그래서 나는 했다pip install https://github.com/tangentlabs/django-oscar-paypal.git@/issue/34/oscar-0.6
404를 돌려주고 있어요
이 브랜치를 설치하려면 어떻게 해야 하나요?
URL 프리픽스를 부가합니다.git+
(VCS 지원 참조):
pip install git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6
그리고 선두 없이 지점 이름을 지정합니다./
.
git+에서 pip을 사용하여 저장소를 복제하는 것은 매우 느릴 수 있습니다(예를 들어 https://github.com/django/django@syslog/1.6.x에서 테스트하는 것은 몇 분 정도 걸립니다).GitHub 및 BitBucket에서 가장 빠르게 동작하는 것은 다음과 같습니다.
pip install https://github.com/user/repository/archive/branch.zip
장고 마스터가 되겠습니다.
pip install https://github.com/django/django/archive/master.zip
Django stable/1.7.x의 경우:
pip install https://github.com/django/django/archive/stable/1.7.x.zip
BitBucket에서는 예측 가능한 패턴과 거의 동일합니다.
pip install https://bitbucket.org/izi/django-admin-tools/get/default.zip
여기서 마스터 브랜치는 일반적으로 default로 명명됩니다.이렇게 하면requirements.txt
설치 속도가 훨씬 빠릅니다.
그 외의 답변에서는, 인스톨 하는 패키지를 인스톨 할 때에 필요한 다양한 것에 대해 설명합니다.requirements.txt
. 이 아카이브 구문을 사용하면 선두에 있는-e
및 후행#egg=blah-blah
는 필수가 아닙니다.또한 URL을 붙여넣기만 하면 되기 때문에 요건을 충족할 수 있습니다.txt는 다음과 같습니다.
https://github.com/user/repository/archive/branch.zip
ssh credential을 사용하여 개인 repo에서 설치하는 방법:
$ pip install git+ssh://git@github.com/myuser/foo.git@my_version
서브디렉토리에서 패키지를 인스톨 하려면 , 다음과 같이 합니다.stackoverflow
$ pip install git+ssh://git@github.com/myuser/foo.git@my_version#subdirectory=stackoverflow
https://pip.pypa.io/en/stable/topics/vcs-support/
pip 파일에 인스톨 하는 경우는, 다음과 같이 추가할 수 있습니다.
-e git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6#egg=django-oscar-paypal
계란으로 저장되겠지만.
이것은 매력적으로 작용했다.
pip3 install git+https://github.com/deepak1725/fabric8-analytics-worker.git@develop
여기서:
개발: 지점
fabric8-analysics-worker.git : Repo
deepak1725: 사용자
에그 파일의 인스톨 순서를 사용했습니다.이 순서에서는, 다음에 인스톨 하는 것을 서포트합니다.git
,git+http
,git+https
,git+ssh
,git+git
그리고.git+file
이들 중 일부는 언급되어 있다.
브랜치, 태그 또는 해시를 사용하여 설치할 수 있습니다.
@Steve_K는 "git+"를 사용하여 설치하는 것이 느릴 수 있으며 zip 파일을 사용하여 설치하는 것이 좋습니다.
pip install https://github.com/user/repository/archive/branch.zip
또는 를 사용하여 설치할 것을 권장합니다..whl
파일(존재하는 경우)
pip install https://github.com/user/repository/archive/branch.whl
에그 파일보다 훨씬 새로운 형식이야휠 및 setuptools>=0.8 패키지가 필요합니다.여기서 더 찾을 수 있어요.
질문 작업으로부터 당신의 제안을 저에게 전달해 주세요.
pip install https://github.com/user/repo.git@branch
구체적으로 말하면 하는 것
pip install -U git+https://github.com/moskomule/anatome.git@dev
작동했다. 아마도 여분의 것을 제거했다./
용장성이 있습니다.출력:
(original_anatome_env) brando~/ultimate-anatome ❯ pip install -U git+https://github.com/moskomule/anatome.git@dev
Collecting git+https://github.com/moskomule/anatome.git@dev
Cloning https://github.com/moskomule/anatome.git (to revision dev) to /private/var/folders/x4/0xq0brj57xz3dbhbmblypbm00000gr/T/pip-req-build-62d_ghd2
Running command git clone -q https://github.com/moskomule/anatome.git /private/var/folders/x4/0xq0brj57xz3dbhbmblypbm00000gr/T/pip-req-build-62d_ghd2
Running command git checkout -b dev --track origin/dev
Switched to a new branch 'dev'
Branch 'dev' set up to track remote branch 'dev' from 'origin'.
Resolved https://github.com/moskomule/anatome.git to commit 4b576e51cb1824a57ea04974e0f92b5a6143294d
Requirement already satisfied: torch>=1.10.0 in /Users/brando/anaconda3/envs/metalearning/envs/original_anatome_env/lib/python3.9/site-packages (from anatome==0.0.6) (1.10.0)
Requirement already satisfied: torchvision>=0.11.1 in /Users/brando/anaconda3/envs/metalearning/envs/original_anatome_env/lib/python3.9/site-packages (from anatome==0.0.6) (0.11.1)
Requirement already satisfied: typing-extensions in /Users/brando/anaconda3/envs/metalearning/envs/original_anatome_env/lib/python3.9/site-packages (from torch>=1.10.0->anatome==0.0.6) (3.10.0.2)
Requirement already satisfied: pillow!=8.3.0,>=5.3.0 in /Users/brando/anaconda3/envs/metalearning/envs/original_anatome_env/lib/python3.9/site-packages (from torchvision>=0.11.1->anatome==0.0.6) (8.4.0)
Requirement already satisfied: numpy in /Users/brando/anaconda3/envs/metalearning/envs/original_anatome_env/lib/python3.9/site-packages (from torchvision>=0.11.1->anatome==0.0.6) (1.21.4)
Building wheels for collected packages: anatome
Building wheel for anatome (setup.py) ... done
Created wheel for anatome: filename=anatome-0.0.6-py3-none-any.whl size=10167 sha256=63b12a36f33deb8313bfe7756be60bd08915b8ba36711be47e292b590df70f61
Stored in directory: /private/var/folders/x4/0xq0brj57xz3dbhbmblypbm00000gr/T/pip-ephem-wheel-cache-rde_ngug/wheels/19/e4/be/01479e8cba62ae8cdcd501cd3bf49e199f2bb94732a6a1b006
Successfully built anatome
Installing collected packages: anatome
Attempting uninstall: anatome
Found existing installation: anatome 0.0.5
Uninstalling anatome-0.0.5:
Successfully uninstalled anatome-0.0.5
Successfully installed anatome-0.0.6
0.6.0은 개발 브랜치버전 번호이고 0.5.0은 마스터이므로 동작했습니다.
Windows 및 pycharm 셋업의 경우:
pycharm을 사용하는 경우 및 사용하려는 경우pip3 install git+https://github.com/...
- 먼저, 당신은 https://git-scm.com/downloads에서 git을 다운로드 받아야 합니다.
- 그런 다음 pycharm을 다시 시작합니다.
- 파이컴 단말기를 사용하여 원하는 것을 설치할 수 있습니다.
언급URL : https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch
'programing' 카테고리의 다른 글
페이지 응답성을 높이려면 이벤트 핸들러를 '수동'으로 표시하십시오. (0) | 2022.11.23 |
---|---|
PHP에서 개체의 보호된 속성을 가져오는 방법 (0) | 2022.11.23 |
stdlib 및 컬러 출력(C) (0) | 2022.11.23 |
Windows에서 동시에 실행되는 여러 Java 버전 (0) | 2022.11.23 |
전화번호 및 주소의 mysql 데이터 유형 (0) | 2022.11.23 |