Django Development on Mac: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Django Category:Python Category:Web Development == Software == === Python === Use version 3.x. As of 2015, version 2.7 comes pre-installed on Mac. It's...") |
(No difference)
|
Latest revision as of 17:26, 31 August 2015
Software[edit]
Python[edit]
Use version 3.x. As of 2015, version 2.7 comes pre-installed on Mac. It's necessary to manually install Python 3.
Django[edit]
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
- 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[edit]
Recommended database is 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.
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- Download the PostgreSQL installer & run it.
- Install pip:
sudo easy_install pip - Django projects that use PostgreSQL databases depend on the
psycopg2package.- This should simply be a matter of
sudo pip install psycopg2, but that install depends onpg_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[1] - With the Homebrew installation of PostgreSQL,
pipshould be able to installpsycopg2.
- This should simply be a matter of
IDE[edit]
PyCharm[edit]
See Django Development on Windows for a list of PyCharm's features.
Other IDEs[edit]
- Sublime Text
- Atom
- KDevelop
Articles & websites comparing Python IDEs[edit]
- PyCharm Vs Sublime Text - Open Source Hacker
Notes[edit]
See also[edit]
References[edit]
- ↑ PostgreSQL Mac OS X packages - PostgreSQL.org