新聞中心
如果你在Python安裝的實(shí)際應(yīng)用的過(guò)程中你有一些關(guān)于Python安裝中存在的問(wèn)題,你就可以瀏覽我們的文章,我們的文章就是對(duì)其相關(guān)內(nèi)容的介紹,希望你在看完我們的文章,以后會(huì)有所收獲。

下載windows版本,下載完成以后,雙擊打開(kāi),然后一步一步安裝。
- *Python 2.5.2 Windows installer
裝好后,啟動(dòng) Python command line,然后輸入:
- *Python 2.5.2 Windows installer
如果輸出
- "Hello World"
那就表明安裝成功了。簡(jiǎn)單的配置:右鍵我的電腦-屬性-高級(jí)-環(huán)境變量,在path里輸入你的python安裝位置即可,比java簡(jiǎn)單的多了。我的是 E:\Python25;應(yīng)該是找到pythonw.exe的父一級(jí)目錄。測(cè)試:隨便建一個(gè)文件夾,如在d\code\python下建立一個(gè)文本文件,并改名為 hello.py在文本中輸入
- print "Hello World"
在命令提示符下進(jìn)入到 d\code\python安裝路徑下輸入python hello.py,直接輸入hello.py (必須設(shè)置環(huán)境變量才可以)程序?qū)?huì)輸出Hello World我們看另一個(gè)稍微復(fù)雜的程序。
- integer1=raw_input("enter the first integer:\n")
- intinteger1=int(integer1)
- integer2=raw_input("enter the second integer:\n")
- intinteger2=int(integer2)
- sum=integer1+integer2
- print "The sum is ",sum
另存為sum.py .執(zhí)行結(jié)果為:
- E:\>python e:\python\sum.py
- enter the first integer:
- 8
- enter the second integer:
- 11
- The sum is 19
以上的文章就是對(duì)Python安裝的實(shí)際應(yīng)用操作方案的介紹。
本文題目:Python安裝的實(shí)際應(yīng)用操作
文章網(wǎng)址:http://www.5511xx.com/article/cccggcc.html


咨詢
建站咨詢
