By: Bartlomiej Mika at https://mikasoftware.com Date: Oct, 13th, 2016
-
Install
Xcode
from the Apple App Store. -
Install the
Command Line Tools
of Xcode. Open a Terminal and type:
$ xcode-select --install
- Next, we need to install
Homebrew
. In the Terminal, type this command line:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Now, we need to insert the
Homebrew
directory at the top of the PATH environment variable. In this way, someHomebrew
installations will take precedence over stock OS X binaries. Open or create the file~/.bash_profile
and write:
export PATH=/usr/local/bin:$PATH
- Close your Terminal and open it again to make these changes effective.
- Install python 3 (latest)
$ brew install python3
- You can check which version is installed by typing
$ python3 --version
- Verify latest is installed:
$ python3
sudo easy_install pip
Q: What is it? A: Python packages installed via the steps above are global in the sense that they are available across all of your projects. That can be convenient at times, but it can also create problems. For example, sometimes one project needs the latest version of Django, while another project needs an older Django version to retain compatibility with a critical third-party extension. This is one of many use cases that virtualenv was designed to solve. On my systems, only a handful of general-purpose Python packages (such as Mercurial and virtualenv) are globally available — every other package is confined to virtual environments.
- To install:
$ sudo pip install virtualenv
- Create some directories to store our projects and virtual environments, respectively:
$ mkdir -p ~/Developer ~/Virtualenvs
- We’ll then open the ~/.bashrc file (which may be created if it doesn’t exist yet)…
$ vi ~/.bashrc
And add some lines to it:
# pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
- Let’s re-load our bash environment:
$ source ~/.bash_profile
- Install library for pip.
brew install postgresql
-
Download for OSX: http://postgresapp.com
-
Copy into /Applications
-
Run it
-
Postgres.app includes many command line tools. If you want to use them, you must configure the
$PATH
variable. If you are using bash (default shell on OS X), add the following line to~/.bash_profile
:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
- Generate SSH key for account.
mkdir ~/.ssh/;
cd ~/.ssh/;
ssh-keygen -t rsa;
- Print the SSH key and copy it to whatever service you us.
cat ~/.ssh/id_rsa.pub;
Using brew
to install the app.
brew install gettext
brew link gettext --force
- Run the following command:
brew install memcached
brew install libmemcached
brew install lzlib
- To startup the cache, run the following.
/usr/local/bin/memcached -d -u nobody
- https://www.computersnyou.com/2960/setup-django-virtualenv-macosx-mavericks/
- http://stackoverflow.com/questions/20251562/how-to-install-django-for-python-3-3
- http://hackercodex.com/guide/python-development-environment-on-mac-osx/
- http://stackoverflow.com/questions/12410113/migrating-virtualenv-and-github-between-computers
- http://www.postgresqlforbeginners.com/2010/11/interacting-with-postgresql-psql.html