one, python Installation
Under the Mac system, the system comes with the Python development environment, opens the terminal, enters the python, we can see the current Python version number, For example my system is OS X EI Caption 10.11.1, The python version comes with 2.7.
Currently Python has been updated to 3.6 because Python3 and Python2 have made incompatible modifications, Python3 development is a trend. Python is: https://www.python.org/downloads/mac-osx/, The latest can be downloaded to 3.6.0a4 (mac), download good later follow the steps to Install.
After installation, you can see two icons on the desktop (IDLE, Python Launcher):
second, PIP Installation
After we installed the python, as long as the version is not too backward, will bring the installation of a pip, after the installation of python3.6, has been installed pip3, we can enter PIP3 in the terminal, if the installation is successful, there will be information input:
third, Django Installation
Django is a web framework, the simplest way to install Django is to use PIP to install, or you can download Django to use a command line installation, but this installation method is easy to cause a problem, If the system comes with python2.7 and is not properly installed, Django is likely to be bundled with python2.7 instead of the newly installed python3.6. When you import django, you will not find the Module.
Installing Django using PIP is very simple and commands the Following:
pip3 install Django==1.10
After the installation is successful, we can use:
Import Django
If there are no errors, the Django installation succeeds.
Smallknot:
Pip is a tool for installing Python packages, a replacement for easy_install, and it is recommended that you use the tool later. This blog story is relatively simple, but also avoids a lot of pits, I hope for beginners can have some help, the time spent on learning, rather than the configuration of the Environment.
Python,django Installation