pip install mysqlclient在Ubuntu上失败,python2.7 on d

2024-04-16 09:57:33 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行下面的docker文件代码时

RUN apt-get update && apt-get install -y --no-install-recommends \
        ca-certificates \
        vim \
        git \
        python \
        python-pip \
        curl \
        wget \
        lsof \
        libmysqlclient-dev \
        python-dev \
        && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

#PYTHON requirements

ENV HTTPS_PROXY "https://gec-proxy-svr.homeoffice.wal-mart.com:8080/"

RUN python --version
RUN pip install pip --upgrade
RUN pip install  setuptools
RUN pip install setuptools --upgrade
RUN pip install git+https://github.com/PyMySQL/mysqlclient-python.git
RUN pip install -r requirements.txt

我有这个错误

^{pr2}$

我尝试通过apt-get-update安装libmysqlclient-dev和python-dev,但它似乎没有解决这个问题。在


Tags: installpipdockerrunhttpsdevgitcom