Build Python and Django environments on the WINDOWS8 _python

Source: Internet
Author: User
Tags install django

Start with setting up the environment first. As a Python beginner, it's important to use vs to develop python, but it feels like few companies in the actual development will use VS to develop python, no way to replace it with MyEclipse.

First, download and install the MyEclipse is skipped.

Second, install Python. The general development environment is in Linux, many tutorials and videos on the Web are also configured and developed under Linux. My development environment is 64-bit WIN8 system, first download 64-bit Python installer from the official website.

From here you can choose which version to download https://www.python.org/downloads/windows/generally more commonly used is the 2.x version, because to learn Django, and Django only support the 2.x version, so I installed 2.7.7. Selecting a version will jump to the supported System Selection page. You can choose a different version depending on your system. If the 64 is installed for the system is 32-bit python will be a lot of messy problems, especially behind the installation of the support, will be prompted not to install Python.

After installation, add the Python installation path to the environment variable. This supports the execution of the Python command at the command line. If you have the following interface at the command line, the installation will prove successful:

Third, the installation of Plug-ins. After installing the MyEclipse, it is necessary to install the Python development plug-in, the installation of Pydev there are two good ways.

1, offline installation, download Pydev offline package, and then extract the Dropins folder. I didn't try this way.

2, online installation. Help--> Install from site, filling pydev-http://update-production-pydev.s3.amazonaws.com/pydev/updates/in work with box Site.xml. And so MyEclipse will automatically install after parsing, this process is a bit long.

General installation will remind you after reboot, restart, as long as in the window--> preferences can see Pydev, it means that you installed successfully.

Iv. Configuration of Pydev:

Click New in Window--> preferences--> PyDev--> Interpreters-python interpreter, and then locate your Python installation directory.

Click the New button to eject the following window:

Select the Python.exe file under the Python path you just installed.

Five, configure the support for MySQL.

If you're using Sqlli, Python is supported by default. But for MySQL, you need to install a third party package.

Download Address: Http://pypi.python.org/pypi/setuptools, at the bottom of the page will see the file download link, download is the Python source code, if you do not install the first setuptools but directly install MYSQLDB, It is likely that you will be prompted with the following error:

Importerror:no module named Setuptools

After downloading, unzip it and enter the unpacked directory under the command line. Perform:

Python setup.py Install

When you press ENTER, it is automatically installed. Next need to download Mysql-python, download address: Http://pypi.python.org/pypi/MySQL-python Select version will jump to the download page. Officially provided by the seemingly only 32-bit, do not know if there will be incompatibilities under the 64-bit system, I was downloaded in the Http://www.codegood.com/downloads 64-bit installer. Download it and install it directly.

Six, install Django.

Django is the most popular web development framework under Python, which integrates the admin background and ORM Framework, and is powerful. Download Address https://www.djangoproject.com/current version is 1.6.5. 1.7 is the beta version. The supported Python is 2.6.5.

After downloading the extract, under the command into the extracted directory, find setup.py file, execute:

Python setup.py Install

is automatically installed. After installation in the Python Library directory will find the Django installation files, in the lib\site-packages\django-1.8-py2.7.egg\egg-info\scripts This path will see a django-admin.py file that creates the core files for the Django project, creates a Django Web project, and runs Django to use it.

When the installation is complete, the PyDev Django Project project appears when you create the project in MyEclipse. As of this, Python and Django environments are configured to complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.