python的第一个程序

python的安装

python的第一个程序

 

1:python的安装

windows安装:

到官网下载python3.7.exe , 安装,配置环境变量,配置pip国内仓库。

windwos的地址:C:\Users\lenovo\AppData\Roaming

在这个路径下创建pip文件夹,C:\Users\lenovo\AppData\Roaming\pip

在这个pip文件夹下创建pip.ini

[global]

timeout = 6000

index-url = http://pypi.douban.com/simple

trusted-host = pypi.douban.com

mac安装:略

ubuntu安装:略

2:第一个python程序

创建文件hello.py

print("Hello World!")

print("Python好简单呀,我要学好挣大钱!")

进入cmd终端;进入hello.py所在的路径;执行python hello.py