
Python
gungun_changjiang
这个作者很懒,什么都没留下…
展开
-
Zip中文解压编码---代码层面修改
Zip解压中文编码问题本地解决原创 2022-05-19 19:14:27 · 543 阅读 · 0 评论 -
解决pip安装包出现 error: Microsoft Visual C++ 14.0 is required. Get it 错误
编译过后的Python包地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud打开网址下载自己想要的安装包将自己想要的包放在想要安装的环境可以找的地方安装即可pip install pycairo-1.19.1-cp38-cp38-win_amd64.whl安装即可。如果失败可以尝试安装Visual C++ 一般在报错的地方会给出解决方案,会有相应的下载地址.https://visualstudio.microsoft...原创 2020-06-17 11:28:26 · 733 阅读 · 0 评论 -
pip 几个国内的镜像源
阿里云http://mirrors.aliyun.com/pypi/simple/中国科技大学https://pypi.mirrors.ustc.edu.cn/simple/豆瓣(douban)http://pypi.douban.com/simple/清华大学https://pypi.tuna.tsinghua.edu.cn/simple/原创 2020-06-02 13:42:18 · 541 阅读 · 0 评论 -
Python列表基本操作01
Python中列表相当于C语言中的数组的概念,一个列表中可以包含任意个数据,每一个数据称为元素。Python允许同一个列表中云元素类型不同,可以使数字、字符串等基本类型,也可以是列表、集合及其他自定义类型的对象。1、创建列表: list1 = [], list2 = [1, 2] 还可以用内置的list类型的构造函数来创建列表 list1 = list() list2 = ...原创 2018-06-23 16:32:15 · 1674 阅读 · 0 评论 -
sublime3配置python3环境的方法(来源于网络)
(一)安装sublime3terminal中安装sublime3步骤为:? 1 2 3 4 5 6 7 8 #添加sublime text3的仓库 sudo add-apt-repository ppa:webupd8team/sublime-text-3 #更新软件库 ...转载 2018-12-24 20:42:54 · 273 阅读 · 0 评论 -
python 异常处理语句
#异常处理 2 try: 3 try: 4 num = input('请输入两个数字以空格隔开!') 5 num = num.split(' ') 6 print(num) 7 # print(sum(num)) 8 except ValueError: 9 print('...原创 2019-01-05 18:32:43 · 1102 阅读 · 0 评论 -
python中用multiprocessing模块来创建多进程
from multiprocessing import Poolimport time, os, random#首先创建子进程函数def run(name): print('子进程%s启动,进程号:%s' % (name, os.getpid())) #为了验证进程执行数量可以采取随机停止时间 #记录开始时间 start = time.time() ...原创 2019-07-16 21:29:11 · 270 阅读 · 0 评论 -
python 递归算法计算一个整数中各个位置上的数字之和。
#coding:utf-8import math#首先判断几位数def diGit(n):a = nc = 0while a != 0:a = a / 10c += 1return cdef sumDigits(n):c = diGit(n) #判断几位数if n < 10:return nelse:l = int(n / math...原创 2018-06-15 15:12:37 · 20157 阅读 · 0 评论