- Steps to install Python 3.x and Django 1.9 on Mac OS X El Capitan (10.11.2) - and use virtualenv and virtualenvwrapper - for a development environment set up locally with the intention of subsequent deployment to Heroku or Digital Ocean or Google App Engine.
- Finishing with adding PostgreSQL later (http://johndturner.me/setting-up-a-new-mac-for-pythondjango-development-os-x-el-capitan/), installed using Homebrew for local development.
This file contains hidden or 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
| # .bash_profile | |
| [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
This file contains hidden or 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
| sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/subl | |
| # Works with OS X 10.9(.5) Mavericks |
This file contains hidden or 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
| #!/bin/bash | |
| /usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm | |
| /usr/bin/sudo /usr/sbin/groupdel rvm | |
| /bin/echo "RVM is removed. Please check all .bashrc|.bash_profile|.profile|.zshrc for RVM source lines and delete | |
| or comment out if this was a Per-User installation." |
This file contains hidden or 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
| { | |
| "auto_complete": true, | |
| "auto_complete_commit_on_tab": true, | |
| "copy_with_empty_selection": true, | |
| "ensure_newline_at_eof_on_save": true, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "index_files": true, |
Database setup ##############
Using PostgreSQL, you need the psycopg2 package pip install psycopg2
psql
CREATE DATABASE mydjangosite;
\l
This file contains hidden or 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
| sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/PATRIOT2 --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app | |
| sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/ELCAPITAN --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app | |
| 1. Once your USB drive has been created, it's time to install El Capitan. | |
| 2. Restart your Mac and hold down the Option key immediately. When your machine boots up, choose the USB drive that says "Install OS X El Capitan" | |
| 3. Select "Disk Utility" and then select your main hard drive. Press "Erase" on the volume. Remember, this will erase EVERYTHING on your machine. | |
| 4. Go back to the main menu and choose "Install OS X." Select your internal hard drive when prompted and continue with the installation. |
{ "font_size": 12, "rulers": [80], "translate_tabs_to_spaces": true, "word_wrap": "true", "ignored_packages": [ "Vintage" ] }
This file contains hidden or 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
| $ node -v | |
| v6.9.5 | |
| $ which gcc | |
| /usr/bin/gcc | |
| $ npm -v | |
| 3.10.10 | |
| $ mkdir "${HOME}/.npm-packages" |
This file contains hidden or 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
| https://images.unsplash.com/photo-1448318440207-ef1893eb8ac0 | |
| https://images.unsplash.com/photo-1447678523326-1360892abab8 | |
| https://images.unsplash.com/photo-1445754574409-bcd715e18017 | |
| https://images.unsplash.com/photo-1444682717031-a2498d603d5b | |
| https://images.unsplash.com/photo-1442405740009-7b57cca9d316 | |
| https://images.unsplash.com/photo-1439337153520-7082a56a81f4 | |
| https://images.unsplash.com/photo-1433832597046-4f10e10ac764 | |
| https://images.unsplash.com/photo-1430651717504-ebb9e3e6795e | |
| https://images.unsplash.com/photo-1428190318100-06790c8b2e5a | |
| https://images.unsplash.com/photo-1422504090664-c57eba84293f |