# Command "python setup.py egg\_info" failed with error code 1 in /tmp/pip-build-g683mbx5/mysqlclient/

**URL:** <https://forum.serverless.com/t/command-python-setup-py-egg-info-failed-with-error-code-1-in-tmp-pip-build-g683mbx5-mysqlclient/3346>\
**Category:** Serverless Framework\
**Created:** [December 16, 2017, 3:43am UTC](https://forum.serverless.com/t/command-python-setup-py-egg-info-failed-with-error-code-1-in-tmp-pip-build-g683mbx5-mysqlclient/3346 "2017-12-16T03:43:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric.snyder](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@eric.snyder](https://forum.serverless.com/u/eric.snyder)\
**Post date:** [December 16, 2017, 3:43am UTC](https://forum.serverless.com/t/command-python-setup-py-egg-info-failed-with-error-code-1-in-tmp-pip-build-g683mbx5-mysqlclient/3346/1 "2017-12-16T03:43:35Z")

</div>

Learning how to deploy python3 to Lambda.  
I have followed these instructions and get that working.

> **[How to Handle your Python packaging in Lambda with Serverless plugins](https://www.serverless.com/blog/serverless-python-packaging/)**
>
> Handling Python dependencies in your Lambda functions can be a pain. Here's how I handle Python packaging with Serverless for dev/prod parity.

I then uninstalled numpy and removed the numpy code from handler.py.  
I installed mysqlclient into my virtual environment.

Now when I try to deploy I get:

Error --------------------------------------------------

Command “python setup dot py egg\_info” failed with error code 1 in /tmp/pip-build-aa0yxiyf/mysqlclient/

```
 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.                                                     

```

Stack Trace --------------------------------------------

Error: Command “python setup.py egg\_info” failed with error code 1 in /tmp/pip-build-aa0yxiyf/mysqlclient/

```
at ServerlessPythonRequirements.installRequirements (C:\numpy-test\node_modules\serverless-python-requirements\lib\pip.js:97:11)         

```

From previous event:  
at PluginManager.invoke (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:366:22)  
at PluginManager.spawn (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:384:17)  
at Deploy.BbPromise.bind.then.then (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\plugins\deploy\deploy.js:120:50)  
From previous event:  
at Object.before:deploy:deploy [as hook] (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\plugins\deploy\deploy.js:110:10)  
at BbPromise.reduce (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:366:55)  
From previous event:  
at PluginManager.invoke (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:366:22)  
at PluginManager.run (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\classes\PluginManager.js:397:17)  
at variables.populateService.then (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\Serverless.js:104:33)  
at runCallback (timers.js:789:20)  
at tryOnImmediate (timers.js:751:5)  
at processImmediate [as \_immediateCallback] (timers.js:722:5)  
From previous event:  
at Serverless.run (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\lib\Serverless.js:91:74)  
at serverless.init.then (C:\Users\Eric\AppData\Roaming\npm\node\_modules\serverless\bin\serverless:42:50)  
at

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![jadhavmanoj](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jadhavmanoj/32/1932_2.png) [@jadhavmanoj](https://forum.serverless.com/u/jadhavmanoj)\
**Post date:** [January 24, 2018, 6:30am UTC](https://forum.serverless.com/t/command-python-setup-py-egg-info-failed-with-error-code-1-in-tmp-pip-build-g683mbx5-mysqlclient/3346/2 "2018-01-24T06:30:18Z")

</div>

@eric.snyder did you find the workaround or fix this issue? I am getting the same problem while installing MySQL package.

---

<div class="post-metadata">

**Author:** ![kjchin](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kjchin](https://forum.serverless.com/u/kjchin)\
**Post date:** [June 25, 2018, 1:51pm UTC](https://forum.serverless.com/t/command-python-setup-py-egg-info-failed-with-error-code-1-in-tmp-pip-build-g683mbx5-mysqlclient/3346/3 "2018-06-25T13:51:41Z")

</div>

Anyone find an answer to this?
