Esteban
Esteban

Reputation: 2513

Lessons starting Django/Python/MySQL on OSX (from OSX newbie)

I am somewhat new to coding and wanted to start my first Django app with a MySQL backend. I've used this setup for almost a year now on my windows machine, but it was an inherited codebase - and I unfortunately never tried to build a new app from scratch. Furthermore, I recently purchased a used MacBook to familiarize myself with the OS and get more accustomed to using Unix (since all of our code runs from Ubuntu/RedHat servers) - so I'm still in the 'finding out how to get around town' phase.

Below are some of the difficulties/errors I ran into, and the answers that worked for me (and weren't necessarily that easy to find). This is not 'This is how you should solve this problem', but merely a repository for how I resolved some issues - and hopefully learn how I should have done it. Feel free to add more!

Upvotes: 3

Views: 450

Answers (2)

Michael Samoylov
Michael Samoylov

Reputation: 3093

  1. Install Homebrew
  2. brew install python mysql
  3. easy_install pip
  4. pip install virtualenv virtualenvwrapper
  5. echo "source /usr/local/bin/virtualenvwrapper.sh > /dev/null" >> ~/.bash_profile
  6. source ~/.bash_profile
  7. mkvirtualenv --no-site-packages <your env name>
  8. pip install django

Upvotes: 0

Alexander Artemenko
Alexander Artemenko

Reputation: 22776

Learn how to use Vagrant + Virtual Box, and develop your Django sites in the same environment as your production.

Upvotes: 2

Related Questions