Building Django Environment on Mac OSX (2/2)

We used homebrew and install virtula env in the last tutorial. Here’s how you can use virtualenv to install Django and set up your first project.

5. Create virtualenv space
I here named it as “sandbox” but you can name it whatever you like, e.g. “venv”.

6. Change directory to sandbox folder

So you see the virtualenv folder structure is built.

7. Activate the virtualenv
Terminal prompt will change when you execute the command. The virtualenv name in braces will appear at the begging of prompt line.

8. Install Django
Use pip to install Django. From here, the installation and environment setup is as same as usual. Thanks to the virtualenv, all installation will be isolated within sandbox folder and does not interfere with the system wide configuration.

9. Start Django project
…and now you are starting Django project called “starts pic” which is my project.

10. Start Django project server
By running Django server, it’s done! You can access the url in your browser 🙂

One thought on “Building Django Environment on Mac OSX (2/2)

  1. Pingback: Building Django developing environment on Mac OSX // Sweet Remedy

Leave a Reply

Your email address will not be published. Required fields are marked *