gpt4 book ai didi

docker - Docker构建在RUN pip install -e git 上失败

转载 作者:行者123 更新时间:2023-12-02 19:28:55 26 4
gpt4 key购买 nike

我正在尝试构建一个docker镜像。

This is my docker file
FROM python:3.6
RUN apt-get -y update
RUN apt-get install -y gcc libc-dev g++ libffi-dev libxml2 libffi-dev unixodbc-dev default-libmysqlclient-dev
COPY requirements.txt requirements.txt
RUN pip install numpy
RUN pip install -e git+<git repo>
RUN pip install -r requirements.txt

但是RUN pip install -e git +失败。我在docker.service文件中调整了dns设置,但还是没有运气。

最佳答案

当我在GitHub存储库中尝试时,-e标志给我一个错误。也许您遇到了this issue吗?

requests为例:

pip install -e git+git://github.com/requests/requests.git

我看到的错误是:

Could not detect requirement name for 'git+git://github.com/requests/requests.git', please specify one with#egg=your_package_name



为了解决这个问题,我添加了要安装的软件包的名称:
pip install -e git+git://github.com/requests/requests.git#egg=requests

关于docker - Docker构建在RUN pip install -e git <repo url>上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53569932/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com