Home Backend Development Python Tutorial Windows下搭建python开发环境详细步骤

Windows下搭建python开发环境详细步骤

Jun 10, 2016 pm 03:04 PM
python windows

本文为大家分享了Windows下搭建python开发环境详细步骤,供大家参考,具体内容如下

1.搭建Java环境

(1)直接从官网下载相应版本的JDK或者JRE并点击安装就可以

(2)JDK与JRE的区别:

1)JDK就是Java Development Kit.简单的说JDK是面向开发人员使用的SDK,它提供了Java的开发环境和运行环境。SDK是Software Development Kit 一般指软件开发包,可以包括函数库、编译程序等

2)JRE是Java Runtime Enviroment是指Java的运行环境,是面向Java程序的使用者,而不是开发者

2.安装python编译器

(1)直接从官网下载相应版本的python并点击安装就可以

(2)一般安装2.7版本,原因是网上对2.7版本的参考资料比较多,而且很多python的常用插件目前也是更新到与python2.7版本兼容而已

3.安装Eclipse平台

(1)从官网下载相应版本的Eclipse,由于该软件是绿色软件所以无需安装,解压到指定的路径后直接打开就可以

4.安装pydev插件

(1)从官网下载相应版本的pydev并解压

(2)解压后有features与plugins两个文件夹,将这两个文件夹的内容复制到Eclipse解压目录下对应的features与plugins文件夹中,重启Eclipse

(3)进入Eclipse,打开help-About Eclipse-Installation Details-Installed Software,检查是否已经成功安装了pydev

5.测试使用

(1)每次打开Eclipse后,都会弹出一个如下的对话框,可以根据个人喜好在Workspace中指定建立pydev工程的路径


(2)每当新指定一个存放pydev工程的路径时,都应该重新配置pydev指定的编译器,步骤为:打开Eclipse-Window-Preferences-pydev-interpreters-python interpreter,界面如下:点击New添加python编译器


(3)建立工程:打开Eclipse-file-new-project-pydev-pydev project,弹出如下界面:


填好相应信息后建立工程test,右击新建的工程文件夹,添加pydev package并命名为test,进入package中添加pydev module命名为test,接着我们就可以在test.py上面编写我们的python代码了。

注意:python的每个package中,都有一个__init__.py文件,有了这个文件,我们才能导入这个目录下的module。

(4)编辑代码:在test.py输入如下代码

#coding=UTF-8 ''''' Created on 2014年8月20日 @author: Collin ''' def test(): str='this is for test' return str if __name__=='__main__': str=test() print str

右击test.py,run as-python run ,检查是否运行成功,若成功则会在console上显示:


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to efficiently integrate Node.js or Python services under LAMP architecture? How to efficiently integrate Node.js or Python services under LAMP architecture? Apr 01, 2025 pm 02:48 PM

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

What is the reason why pipeline persistent storage files cannot be written when using Scapy crawler? What is the reason why pipeline persistent storage files cannot be written when using Scapy crawler? Apr 01, 2025 pm 04:03 PM

When using Scapy crawler, the reason why pipeline persistent storage files cannot be written? Discussion When learning to use Scapy crawler for data crawler, you often encounter a...

Python Cross-platform Desktop Application Development: Which GUI Library is the best for you? Python Cross-platform Desktop Application Development: Which GUI Library is the best for you? Apr 01, 2025 pm 05:24 PM

Choice of Python Cross-platform desktop application development library Many Python developers want to develop desktop applications that can run on both Windows and Linux systems...

What is the reason why the Python process pool handles concurrent TCP requests and causes the client to get stuck? What is the reason why the Python process pool handles concurrent TCP requests and causes the client to get stuck? Apr 01, 2025 pm 04:09 PM

Python process pool handles concurrent TCP requests that cause client to get stuck. When using Python for network programming, it is crucial to efficiently handle concurrent TCP requests. ...

How to view the original functions encapsulated internally by Python functools.partial object? How to view the original functions encapsulated internally by Python functools.partial object? Apr 01, 2025 pm 04:15 PM

Deeply explore the viewing method of Python functools.partial object in functools.partial using Python...

Python hourglass graph drawing: How to avoid variable undefined errors? Python hourglass graph drawing: How to avoid variable undefined errors? Apr 01, 2025 pm 06:27 PM

Getting started with Python: Hourglass Graphic Drawing and Input Verification This article will solve the variable definition problem encountered by a Python novice in the hourglass Graphic Drawing Program. Code...

How to optimize processing of high-resolution images in Python to find precise white circular areas? How to optimize processing of high-resolution images in Python to find precise white circular areas? Apr 01, 2025 pm 06:12 PM

How to handle high resolution images in Python to find white areas? Processing a high-resolution picture of 9000x7000 pixels, how to accurately find two of the picture...

How to efficiently count and sort large product data sets in Python? How to efficiently count and sort large product data sets in Python? Apr 01, 2025 pm 08:03 PM

Data Conversion and Statistics: Efficient Processing of Large Data Sets This article will introduce in detail how to convert a data list containing product information to another containing...

See all articles