Setting up mysql for python

Posted: March 31, 2015 in DJango
Tags: ,

OK, after trying to setting up my virtual environment for django I was struggling working with mysql.

What I was getting is after running:



$ pip install MySQL-python

EnvironmentError: mysql_config not found

So basically what was needed was to reinstall mysql again but now for my local environment:



$ sudo apt-get build-dep python-mysqldb

$ pip install mysql-python

And the just run the migration:



$ python manage.py migrate
Operations to perform:
  Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying sessions.0001_initial... OK

Running correctly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s