Last active
October 30, 2018 04:51
-
-
Save nghiaht/0521f4da11ddcd4e0357999076aeb380 to your computer and use it in GitHub Desktop.
Setup steps for python mysqlclient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
mkdir virtualenvs | |
cd virtualenvs | |
pip install virtualenv | |
virtualenv default # or virtualenv -p python3 default (depends on environments) | |
sudo apt-get install -y python-dev # or python3-dev | |
sudo apt-get install -y libmysqlclient-dev | |
source default/bin/activate | |
pip install mysqlclient | |
# https://stackoverflow.com/questions/33315210/error-command-x86-64-linux-gnu-gcc-when-installing-mysqlclient/33315233 | |
# https://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment