I'm trying to deploy my flask app that uses mysql to store records. I've tried pymsql, mysql connector, mysql client, flask mysqldb. none worked

codepeacock
TRIAL

a year ago

10 13.76 return hook(config_settings)

10 13.76 ^^^^^^^^^^^^^^^^^^^^^

10 13.76 File "/tmp/pip-build-env-v97my7ow/overlay/lib/python3.11/site-packages/setuptools/buildmeta.py", line 327, in getrequiresforbuild_wheel

10 13.76 return self.getbuildrequires(configsettings, requirements=[])

10 13.76 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

10 13.76 File "/tmp/pip-build-env-v97my7ow/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 297, in _getbuildrequires

10 13.76 self.run_setup()

10 13.76 File "/tmp/pip-build-env-v97my7ow/overlay/lib/python3.11/site-packages/setuptools/buildmeta.py", line 313, in runsetup

10 13.76 exec(code, locals())

10 13.76 File "", line 155, in

10 13.76 File "", line 49, in getconfigposix

10 13.76 File "", line 28, in findpackagename

10 13.76 Exception: Can not find valid pkg-config name.

10 13.76 Specify MYSQLCLIENTCFLAGS and MYSQLCLIENTLDFLAGS env vars manually

10 13.76 [end of output]

10 13.76

10 13.76 note: This error originates from a subprocess, and is likely not a problem with pip.

10 13.76 error: subprocess-exited-with-error

10 13.76

10 13.76 × Getting requirements to build wheel did not run successfully.

10 13.76 │ exit code: 1

10 13.76 ╰─> See above for output.

10 13.76

10 13.76 note: This error originates from a subprocess, and is likely not a problem with pip.

10 ERROR: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" did not complete successfully: exit code: 1

> [stage-0 6/10] RUN --mount=type=cache,id=s/9796f220-e49f-4777-9bff-6aa3f700f6af-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:

13.76 [end of output]

13.76

13.76 note: This error originates from a subprocess, and is likely not a problem with pip.

13.76 error: subprocess-exited-with-error

13.76

13.76 × Getting requirements to build wheel did not run successfully.

13.76 │ exit code: 1

13.76 ╰─> See above for output.

13.76

13.76 note: This error originates from a subprocess, and is likely not a problem with pip.

3 warnings found (use --debug to expand):

  • UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 21)

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 21)

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 26)

Dockerfile:23

21 | ENV NIXPACKSPATH /opt/venv/bin:$NIXPACKSPATH

22 | COPY . /app/.

23 | >>> RUN --mount=type=cache,id=s/9796f220-e49f-4777-9bff-6aa3f700f6af-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

24 |

25 | # node:install phase

ERROR: failed to solve: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" did not complete successfully: exit code: 1

Error: Docker build failed

View Deploy details

> ⓘ Deployment information is only viewable by project members and Railway employees.

2 Replies

codepeacock
TRIAL

a year ago

Let me know any info you need from me and the steps to get that info


a year ago

I would recommend you use a pure python mysql client library and then make sure you remove any other python client libraries from your requirements.txt file.