GithubHelp home page GithubHelp logo

python-slim-mysqlclient's People

Contributors

bitswamp avatar

Stargazers

 avatar

Watchers

 avatar  avatar

python-slim-mysqlclient's Issues

Got error: `undefined symbol: TLS_client_method`

I wrote it in a similar way to you, but I got this error:

ImportError: /usr/local/lib/python3.10/site-packages/MySQLdb/_mysql.cpython-310-x86_64-linux-gnu.so: undefined symbol: TLS_client_method

Could you help me? ๐Ÿ˜ญ

My dockerfile:

FROM python:3.10.9-slim AS build

WORKDIR /app

RUN apt-get update && \
    apt-get install -y python3-dev default-libmysqlclient-dev build-essential

RUN apt-get install -y git
RUN git clone --branch v2.1.1 --depth 1 https://github.com/PyMySQL/mysqlclient
RUN cd mysqlclient && \
    python3 setup.py --static bdist_wheel && \
    mkdir /wheel && \
    mv ./dist/*.whl /wheel


FROM python:3.10.9-slim AS release

WORKDIR /app
COPY --from=build /wheel /wheel

RUN pip install --no-index --find-links=/wheel mysqlclient

COPY ./dist/project-0.3.0-py3-none-any.whl ./

RUN pip install ./project-0.3.0-py3-none-any.whl

EXPOSE 8000

# CMD [ "pip", "list", "|", "grep", "mysqlclient" ] # make sure mysqlclient is exist

CMD [ "python","-m", "project" ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.