Issue installing mysqlclient for FastAPI app
While building my app it's currently failing to install mysqlclient. I'm using nixpacks and I just updated the NIXPACKS_PYTHON_VERSION env var to use 3.11 which is the same as I'm running locally in my venv. I'm new to railway (and python apps) so i'd appreciate any tips on how to get the requirements to install and build successfully. I've attached the error message from the logs and my off-the-shelf railway.json file. Let me know if there's anything else I can provide. Thanks!
Solution:Jump to solution
hey sorry, no luck with that. ended up removing that package and using mysql-connector-python instead and had no issues deploying
8 Replies
Project ID:
29c1de9a-08fa-436a-b5cd-cb0c449f15d5
project 29c1de9a-08fa-436a-b5cd-cb0c449f15d5
add this as a nixpacks.toml file to your project
disclaimer: untested
any update? did this work?
Solution
hey sorry, no luck with that. ended up removing that package and using mysql-connector-python instead and had no issues deploying
im glad you found success, but i think id like to finally get to the bottom on this, so is this the correct package you where using?
https://pypi.org/project/mysqlclient/
yes that’s correct
Sorry, I didn't understand the solution, do I have to install the library you sent? Points to mysqlclient which is the failing library
yeah it doesnt work, use the solution directive came to