python
1条咸鱼
学习,学习
展开
-
关于from PIL import Image报错的问题
首先确定你已下载pillow(pyhton2为PIL,python3为pillow)和Image pip install pillow pip install Image 觉得慢就加源:https://blog.csdn.net/qq_44105350/article/details/108727978 若反馈类似的: ImportError: cannot import name ‘image’ from ‘PIL’ 解决方案: 重新下载pillow: pip uninstall pillow..原创 2020-10-10 13:51:26 · 2153 阅读 · 1 评论 -
python pip基本命令和镜像源
python pip 安装镜像源 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 华中理工大学:http://pypi.hustunique.com/ 山东理工大学:http://pypi.sdutlinux.org/ 豆瓣:http://pypi.douban.com/simple/原创 2020-10-05 10:24:16 · 454 阅读 · 0 评论 -
python 使用递归编写一个十进制转二进制,结果以字符串的形式
python 使用递归编写一个十进制转二进制,结果以字符串的形式 网课老师的代码(小甲鱼) def Dect(dec): result='' if dec: result=Dect(dec//2) return result+str(dec%2) else: return result print(Dect(65)) 我的代码 def num(n): if n==0 or n==1: return n原创 2020-08-09 16:04:11 · 642 阅读 · 0 评论