3 months ago
Hi,
I get an error while deploying my app because it has problems with the Python mysqlclient library. I need this library as the framework I use requires it to build a connection.
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
Do you know how to fix this?
Thank you and best regards
ⓘ Deployment information is only viewable by project members and Railway employees.
9 Replies
brody
Hello,Please provide your requirements.txt fileThanks,Brody
3 months ago
Hi Brody, do you know a solution for my problem? Thank you
tigeilen
Hi Brody, do you know a solution for my problem? Thank you
3 months ago
please see attached requirements file
Attachments
3 months ago
Hello,
Please only use PyMySQL
-- you currently use mysqlclient
and mysql-connector-python
Best,
Brody
brody
Hello,Please only use PyMySQL -- you currently use mysqlclient and mysql-connector-pythonBest,Brody
3 months ago
Hi Brody, thanks for your answer. Unfortunately it doesn´t work.
I uninstalled mysqlclient and mysql-connector-python and tried to run my application with PyMySQL.
I get an error from the streamlit framework as follows:
"ModuleNotFoundError: No module named 'MySQLdb'. You need to install the 'mysqlclient' package to use this connection."
So it seems that streamlit requires the mysqlclient package. See streamlit documentation:
https://docs.streamlit.io/develop/tutorials/databases/mysql
Is there any other chance to use the mysqlclient?
Thanks,
Tim
brody
You would have to write a Dockerfile for this deployment it seems.
2 months ago
Hi Brody, I added the dockerfile to my Github Repo and build was successful!
Thank you for your help!!
Best Regards
Tim
Status changed to Solved brody • 2 months ago