python安装
python安装
1.安装包下载
https://repo.huaweicloud.com/python/
2.配置镜像源
windows路径:C:\Users<UserName>\pip\pip.ini
linux路径: ~/.pip/pip.conf
如果安装完没有该文件,在资源管理器的地址栏输入%appdata%后回车,新建一个pip文件夹,在pip文件夹里面新建一个配置文件pip.ini
[global]
index-url = https://repo.huaweicloud.com/repository/pypi/simple
trusted-host = repo.huaweicloud.com
timeout = 120
或者
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host = pypi.douban.com
或者
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
3.字符设置
#!/usr/bin/python
# -*- coding: utf-8 -*-
4.读取csv文件
def read2():
print("-------")
csv_reader = csv.reader(open("./config.csv"))
for line in csv_reader:
print(line)
return
read2()
5.pip安装依赖
pip freeze > requirements.txt
pip install -r requirements.txt
6.pypi安装
wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
tar -zxvf pip-9.0.1.tar.gz
cd pip-9.0.1
python setup.py install
【励志篇】:
古之成大事掌大学问者,不惟有超世之才,亦必有坚韧不拔之志。