2 回答
TA贡献1883条经验 获得超3个赞
该-e
选项使安装的包可编辑,这不是我想要的。事实上,没有它它也能工作!因此,如果您想避免src
到处出现文件夹 - 从 git 下载而不带 -e 选项: git+<link>#<egg>
不幸的是,我没有找到任何这方面的文档......所以请随意发布更深刻的答案或添加到这个答案中。
TA贡献1911条经验 获得超7个赞
在requirements.txt中指定git+https位置的以下格式对我有用:
pycocotools@git+https://github.com/gautamchitnis/cocoapi.git@cocodataset-master#subdirectory=PythonAPI
但我必须先安装numpyand Cython,这样该包的安装才能成功。setuptools已经安装了,这可能也需要注意。
PS C:\Users\user\Documents\project> pip install -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com, https://download.pytorch.org/whl/cu113
Collecting pycocotools@ git+https://github.com/gautamchitnis/cocoapi.git@cocodataset-master#subdirectory=PythonAPI
Cloning https://github.com/gautamchitnis/cocoapi.git (to revision cocodataset-master) to c:\users\user\appdata\local\temp\pip-install-ofosrylu\pycocotools_6c865fdd5be947bdaed6b1bb6e7ec022
Running command git clone -q https://github.com/gautamchitnis/cocoapi.git 'C:\Users\user\AppData\Local\Temp\pip-install-ofosrylu\pycocotools_6c865fdd5be947bdaed6b1bb6e7ec022'
Running command git checkout -b cocodataset-master --track origin/cocodataset-master
Branch 'cocodataset-master' set up to track remote branch 'cocodataset-master' from 'origin'.
Switched to a new branch 'cocodataset-master'
# ... output of other packages
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (setup.py) ... done
Created wheel for pycocotools: filename=pycocotools-2.0-cp39-cp39-win_amd64.whl size=82226 sha256=4fcb72a83132367541d71faa8f0fb5a838e910c017f9aa033d13c19aebaada61
Stored in directory: C:\Users\user\AppData\Local\Temp\pip-ephem-wheel-cache-_ygd_748\wheels\a6\5f\ec\1eaf8c69abab5724baee819736e6d30adad774deb60736413b
Successfully built pycocotools
添加回答
举报