随笔分类 - Python
摘要:from PIL import Image src = 'E:\\temp\\logo.jpeg' dst = 'E:\\temp\\logo.bmp' img = Image.open(src) img.convert('P').save(dst)
阅读全文
摘要:摘自:https://www.jianshu.com/p/dfbb90995a2c 【如涉及版权问题,请联系本人处理。谢谢!】 国内源: 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/si
阅读全文
摘要:环境说明: windows7、vscode1.33.1、python3.7.0。 解决方案: 通过安装程序单独卸载“tcl/tk and IDLE” 重新安装“tcl/tk and IDLE” 重启电脑。(只重启vscode没有效果)。 尝试过的无效方法: 1、修复安装python。
阅读全文
摘要:参考: https://docs.python.org/3/library/hashlib.html?highlight=hashlib#credits https://blog.csdn.net/weixin_42934547/article/details/81805897 https://bl
阅读全文
摘要:参考: https://docs.python.org/3/library/zipfile.html https://zhidao.baidu.com/question/1498409764366387259.html https://blog.csdn.net/dou_being/article/
阅读全文
摘要:环境说明:windows 7、python 3.7.0、pyinstaller 3.1。 解决方案:升级pyinstaller 到 3.4。
阅读全文
摘要:pip install scrapy pip install twisted pip install BeautifulSoup4 pip install lxml pip install Pillow 图像处理库 pip install matplotlib
阅读全文
摘要:需求:按图片分辨率范围分类图片(每个商品有N张图片在一个目录内)。 实现:用PIL Image打开图片并读取宽度和高度。然后按不同分辨率存档到不同目录。 问题:从原有目录移动到目标目录时出现 “PermissionError: [WinError 5] 拒绝访问。: 'E:\\src\\dir1'
阅读全文

浙公网安备 33010602011771号