Editing
Django Development on Mac
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Software == === Python === Use version 3.x. As of 2015, version 2.7 comes pre-installed on Mac. It's necessary to manually install Python 3. === Django === <div class="alert-warning">If multiple versions of Python are installed on the system, it's necessary to create a virtualenv to install Python packages such as Django. See [[Python Virtual Environments]]</div> * [https://docs.djangoproject.com/en/1.8/topics/install/ How To Install Django] - Django Documentation (version 1.8) * Mac: `sudo pip install Django` ''N.B. The iMac that was purchased in 2015 came with python 2.x installed. Python 3 was manually installed.'' '' In this situation typing `python` on the command line invokes python 2.x.'' ''To invoke python 3.x it's necessary to use `python3`. Similarly, `pip` will install for python 2.x, while `pip3` installs for python 3.x.'' === Database === Recommended database is [http://www.postgresql.org/download/ PostgreSQL]. The PostgreSQL server is running on littledamienii. It's not necessary to have a local database server. However, python does require the `psycopg2` package in order to connect to the database. <div class="alert-warning">If multiple versions of Python are installed on the system, it's necessary to create a virtualenv to install Python packages such as `psycopg2`. See [[Python Virtual Environments]]</div> * Download the PostgreSQL installer & run it. * Install '''pip''': `sudo easy_install pip` * Django projects that use PostgreSQL databases depend on the `psycopg2` package. ** This ''should'' simply be a matter of `sudo pip install psycopg2`, but that install depends on `pg_config`, which appears to be part of the "Homebrew" install of PostgreSQL. ** Don't install PostgreSQL using the EnterprisesDB installer. ** Install with "Homebrew": `brew install postgresql` <ref>[http://www.postgresql.org/download/macosx/ PostgreSQL Mac OS X packages] - PostgreSQL.org</ref> ** With the Homebrew installation of PostgreSQL, `pip` should be able to install `psycopg2`.
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information