随笔分类 -  python

摘要:出现错误如下图: 主要原因为编辑python脚本使用的编辑器编码有问题。我使用的编辑器是notepad++,由于没有做Python语言编辑配置,默认使用的是ANSI编码(右下角位置有编码格式),如下: python3使用的是utf-8编码,如果脚本文件全是英文字符,ANSI编码是utf-8编码的子集 阅读全文
posted @ 2019-07-24 10:54 xbook_ben 阅读(26830) 评论(0) 推荐(2)
摘要:源码片段: 执行时提示如下错误: Traceback (most recent call last): File "threading.py", line 2, in <module> import threading File "I:\MY_TEST\py\thread\threading.py" 阅读全文
posted @ 2018-08-27 16:34 xbook_ben 阅读(21130) 评论(1) 推荐(2)
摘要:如果直接用pip install lxml安装成功,那么恭喜!!! 一般在windows安装都十分蛋疼,pip无法直接安装(提示错误一大片,此处省略……) 因此选择wheel安装方式,步骤如下: 1、打开cmd,安装wheel库文件: pip install wheel 2、查看python对应的版 阅读全文
posted @ 2018-08-21 13:39 xbook_ben 阅读(1859) 评论(0) 推荐(0)