{"id":17454,"date":"2024-11-20T11:34:07","date_gmt":"2024-11-20T11:34:07","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=17454"},"modified":"2024-11-20T11:34:08","modified_gmt":"2024-11-20T11:34:08","password":"","slug":"subprocess-exited-with-error-when-installing-mysqlclient","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/","title":{"rendered":"Subprocess exited with error when installing mysqlclient."},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>You may run into the error &#8220;Subprocess exited with error when installing mysqlclient&#8221; when trying to install the mysqlclient for your application using pip.<\/p>\n\n\n\n<p>This guide will take you how to resolve the issue.<\/p>\n\n\n\n<p>Requirements.<\/p>\n\n\n\n<p>Root access to the server. <\/p>\n\n\n\n<p>The error occurs due to missing build dependencies required to build wheel for mysqlclient.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png\" alt=\"\" class=\"wp-image-17455\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-300x141.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-768x362.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438.png 1091w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The error is clearly captured from screen when running <strong><code>pip install mysqlclient<\/code><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-442-1024x341.png\" alt=\"\" class=\"wp-image-17459\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-442-1024x341.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-442-300x100.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-442-768x255.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-442.png 1323w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Install the missing dependencies<\/p>\n\n\n\n<p>Run the command<\/p>\n\n\n\n<p><code><strong>yum install python3-devel mysql-devel pkgconfig<\/strong><\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"410\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-445-1024x410.png\" alt=\"\" class=\"wp-image-17462\" style=\"width:840px;height:auto\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-445-1024x410.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-445-300x120.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-445-768x307.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-445.png 1357w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Try again now to install mysqlclient <\/p>\n\n\n\n<p><strong><code>pip install mysqlclient<\/code><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"271\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-447-1024x271.png\" alt=\"\" class=\"wp-image-17464\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-447-1024x271.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-447-300x80.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-447-768x204.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-447.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>All Done!<\/p>\n\n\n\n<p>You can now proceed with your app configurations!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may run into the error &#8220;Subprocess exited with error when installing mysqlclient&#8221; when trying to install the mysqlclient for your application using pip. This guide will take you how to resolve the issue. Requirements. Root access to the server. The error occurs due to missing build dependencies required to build wheel for mysqlclient. The [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1833,1879,2128],"doc_tag":[],"class_list":["post-17454","docs","type-docs","status-publish","hentry","doc_category-mysql","doc_category-servers","doc_category-vps-servers"],"year_month":"2026-06","word_count":98,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Kibera","author_nicename":"dan-k","author_url":"https:\/\/truehost.com\/support\/author\/dan-k\/"},"doc_category_info":[{"term_name":"MySQL","term_url":"https:\/\/truehost.com\/support\/docs-category\/mysql\/"},{"term_name":"Servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/servers\/"},{"term_name":"VPS-Servers","term_url":"https:\/\/truehost.com\/support\/docs-category\/vps-servers\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Subprocess exited with error when installing mysqlclient. -<\/title>\n<meta name=\"description\" content=\"How to resolve error &quot;Subprocess exited with error&quot; when installing mysqlclient using pip.See steps below to resolve..\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Subprocess exited with error when installing mysqlclient. -\" \/>\n<meta property=\"og:description\" content=\"How to resolve error &quot;Subprocess exited with error&quot; when installing mysqlclient using pip.See steps below to resolve..\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-20T11:34:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/\",\"name\":\"Subprocess exited with error when installing mysqlclient. -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-438-1024x482.png\",\"datePublished\":\"2024-11-20T11:34:07+00:00\",\"dateModified\":\"2024-11-20T11:34:08+00:00\",\"description\":\"How to resolve error \\\"Subprocess exited with error\\\" when installing mysqlclient using pip.See steps below to resolve..\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-438-1024x482.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-438-1024x482.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/subprocess-exited-with-error-when-installing-mysqlclient\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Subprocess exited with error when installing mysqlclient.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Subprocess exited with error when installing mysqlclient. -","description":"How to resolve error \"Subprocess exited with error\" when installing mysqlclient using pip.See steps below to resolve..","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/","og_locale":"en_US","og_type":"article","og_title":"Subprocess exited with error when installing mysqlclient. -","og_description":"How to resolve error \"Subprocess exited with error\" when installing mysqlclient using pip.See steps below to resolve..","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/","article_modified_time":"2024-11-20T11:34:08+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/","name":"Subprocess exited with error when installing mysqlclient. -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png","datePublished":"2024-11-20T11:34:07+00:00","dateModified":"2024-11-20T11:34:08+00:00","description":"How to resolve error \"Subprocess exited with error\" when installing mysqlclient using pip.See steps below to resolve..","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-438-1024x482.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/subprocess-exited-with-error-when-installing-mysqlclient\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"Subprocess exited with error when installing mysqlclient."}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/17454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=17454"}],"version-history":[{"count":1,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/17454\/revisions"}],"predecessor-version":[{"id":17469,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/17454\/revisions\/17469"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=17454"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=17454"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=17454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}