Python, Pycharm, Django installation detailed tutorial (Photo)

 
This article describes the Python, Pycharm, Django installation detailed tutorial, sample code by text describes in great detail, has a certain reference value of learning for all of us to learn or work, you need friends with Xiao Bian below to learn learn together it
 

A recent project to use python, so needless to say we have to first configure the python python environment and choose a good tool. Then share your own installation process.

(A), Python installation

1. First enter the official website to download python version, https://www.python.org/downloads/

2. After the download is complete, double-click the .exe file to install, you can customize the installation, you can also installed by default, I chose custom installation, note: I have here is the option to automatically generate environment variables, so I Add Python3.6 to Path check on.

3. default installation, Next

4. Choose the custom installation path

The installation interface

6. In order to check our python is installed successfully, you can enter python query in a command window, such as a display of information in the chart indicates success.

(B), Django installation

1. Download Source Package django

Official website to download the required version of Django https://www.djangoproject.com/download/ ,

Download Source Package as: Django-1.11.9.tar.gz

Unzip and install Python and placed in the same directory root directory, I Python3.6.4 is installed in the D: \ KQQ \ Python \ Python36, the so django is installed in the D: \ KQQ \ Python \ folder, Django into the directory, (mine is D: \ KQQ \ Python \ Django-1.11.9 this folder), execution

python setup.py install

Then start the installation, Django Python is to be mounted to the lower site-packages Lib folder.

as the picture shows:

Configuring Django environment

Script and the site-packages in the django Python installation are placed in the system environment variable.

For example, my two paths are: D: \ program files \ python2.7.0 \ Scripts; and D: \ program files \ python2.7.0 \ Lib \ site-packages \ Django-1.9.7-py2.7.egg \ django ;

The; D: \ KQQ \ Python \ Python36 \ Scripts; D: \ KQQ \ Python \ Python36 \ Lib \ site-packages \ Django-1.11.9-py3.6.egg \ django system into the variable Path, note front of; to be separated from the previous one.

Django check whether the installation was successful,

Run the following command django installation directory, the following interface represents a successful installation.

python 
import django  
django.get_version()

After Python and django installation, choose a good development tool, I use the pycharm tool, the installation process is as follows.

(Three), pycharm installation

1. Go to the official website to download PyCharm, https://www.jetbrains.com/pycharm/download/

 

2. Run the .exe file

 

3. Custom installation path, select the directory you want to install

4. Check your computer's operating system is 32 or 64, I was 64.

 

5. Click Install

 

The installation is complete run pycharm

 

7. Select the second item

 

8. The following interface, select Activation code,

9. In the address bar of the browser input: http://idea.lanyus.com/ , the web site, without modifying the user name, click Get License. The registration code copy and paste the Activation code registration interface of the input box and click ok.

10. Choose your favorite theme color, Next

11. Default

 

12. Create a python project start

13. The selection item path and name, as follows:

 

14. Create a python file, the output of our HELLO WORLD, run the following, which indicates success.

 

The first example of such a python successfully up and running. Follow continue to sum up experience and create problems django project.

That's all for this article, I want to be helpful to learn, I hope you will support script home.

Guess you like

Origin www.cnblogs.com/sq1995liu/p/12079291.html