Build a Python Development Environment 1. Install Aptana
Aptana website in http://aptana.com/
Upload aptana_studio_setup_1.2.7.exe to the website. There may be updated versions in the future. I believe there is no big difference in installation.
Note:
◆ 1.2.7 Aptana Studio does not support Chinese directory names. Therefore, it is strongly recommended to install it in an English directory.
◆ We recommend that you set the default working directory to a directory in English after installation. Avoid possible incompatibility issues. Some functions are unavailable or work exceptions)
Build a Python Development Environment II. Install Pydev
Install Pydev in two ways: Download the Zip file for local installation and online update to obtain new features. I use the latter. This method keeps your development plug-ins updated at any time.
Aptana is developed based on Eclipse by using the Eclipse plug-in management mechanism ). Follow the steps below to update the SDK.
Select the menu: Help-> Software Upates-> Find and Install-> Search for new features to install-> New remote site-> set a name such as pydev, url fill in http://www.fabioz.com/pydev/updates-> and then follow the prompts to download the installation.
You can use http://pydev.sf.net/updates. However, we recommend that you use http://www.fabioz.com/pydev/updates.
Build a Python development environment 3. configure a Python Development Environment
In Aptana, open Window-> Preferences... Dialog box, select "PyDev"-> "Interpreter Python" from the tree list on the right, and click Auto Config. Aptana will automatically search for Python installed in the system. And add the PYTHONPATH. Check whether there are any obvious exceptions. Click OK to exit.
Build a Python development environment 4. Develop Django Projects
1. Create a PyDev Project
Aptana-> File-> New-> Other-> Pydev-> select Pydev Project-> start a Project name, such as demo)-> select a path, such as E: \ work-> select 2.6 For Your Python version)-> remove the following check box and do not create a src file to develop a Django application. We do not need this folder)-> Finish
2. Create a Django Project
(1) enter the directory where Aptana just created the Project, run: django-admin.py startproject demo.
(2) Go Back To Aptana-> In Aptana Project view, right-click the new Project, and select "Refresh" from the pop-up menu to view the Django Project. You can right-click the menu to add or delete files and directories.
(3) Right-click the Python project and choose Properties> PyDev-PYTHONPATH> Add the DjangoProject directory (project file path) to the project code.-> OK
(4) configure the Django project: choose Django's project name-> Run menu-> Open Run Dialog-> Python Run-> right-click New-> write the project name in the Main panel, load the project name and Main Module through Browse, and select manage for Main Module. py-> In the Augement panel, the argument must be runserver -- noreload, and the following working directory must be added to your base directory.
(5) A 10013 error will be returned when running the service directly. This is because Aptana has a built-in web server in this province and uses port-by default. Therefore, you can make adjustments:
Method 1: Adjust the port occupied by Aptana:
Choose Windows> Preference... -> Aptana-> HTTP Server: Set the Build-in HTTP Server Port (s). The value range is 8200-8500.
Of course, if this is changed, you need to adjust the port number pointed to by the URL in the browser when you need to use the internal HTTP server later.
Method 2: Adjust Operation Parameters
Let Django's Development Server Run on other ports. Modify the Argument of run and set Argument to 8800.
The Python development environment has been modified, configured, and constructed. The Django development environment is enough. It is equivalent to a comprehensive development tool with JS, Python, and HTML. What do you want now ?!
Not enough? Continue to enrich the Eclipse plug-ins!
- How to Implement the Run As code in Python and C #
- Ranking of scripting languages: Leading in PHP, Ruby, and Python
- Python select Mercurial Hg Version Control System
- Solve the problem of mixed errors in Chinese and English in Python
- Use Oracle database for Python data persistence