pyinstaller使用错误 SyntaxError: Non-UTF-8 code starting with '\xb4' in file C:......
注:我的博客原本在CSDN,现转到博客园,图片采用以前的图片,并没有盗图。
在将.py文件打包时,出现了下列错误
>>C:\Users\小呆\PycharmProjects\pycharm编程>pyinstaller
>>File "C:\Users\小呆\AppData\Local\Programs\Python\Python36\Scripts\pyinstaller-script.py", line 1SyntaxError: Non-UTF-8 code starting with '\xb4' in file C:\Users\小\AppData\Local\Programs\Python\Python36\Scripts\pyinstaller-script.py on line 1, but no encoding declared; seehttp://python.org/dev/peps/pep-0263/ for details
是由于Scripts文件夹下的pyinstaller-script.py不适合本机。
问题有二:
1. 编码不对。
解:首行加上coding:utf-8。必须是首行!!

2. win10用户文件名存在中文,出现乱码。
解:将下面的地方改成中文。(乱码已经被我改掉了,每个人看自己的情况)

pyinstaller使用错误 SyntaxError: Non-UTF-8 code starting with '\xb4' in file C:......的更多相关文章
- SyntaxError: Non-UTF-8 code starting with '\xba' in file 错误的解决方法!!
第一次在Eclipse建立python工程,添加了自己新建的文件,写了一点代码,随后执行时候出现了错误,和昨天我在Visual Studio 2015里面一样,错误: SyntaxError: Non ...
- 怎么解决syntaxerror:non-utf-8 code starting with \xc4'in file
怎么解决syntaxerror:non-utf-8 code starting with \xc4'in file 首行增加,已测试可用. # coding=gbk 程序中出现中文,运行的时候 ...
- 运行python文件时出错SyntaxError: Non-UTF-8 code starting with '\xb5' in file, but no encoding declared;
今天ytkah在运行python文件时出现错误,提示如下,很明显这是没有定义python文件编码引起的问题,那么要怎么解决呢?很简单,在文件头部定义一下就可以了. File "hello.p ...
- SyntaxError: Non-UTF-8 code starting with '\xe5' in file ***.py on line 105, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for
用charles抓包时, 对抓到的html,放到pycharm中解析, 结果报错: SyntaxError: Non-UTF-8 code starting with '\xe5' in file * ...
- python--遇到SyntaxError: Non-UTF-8 code starting with '\xb8' in file
在运行python中因为添加了中文注释,遇到SyntaxError: Non-UTF-8 code starting with '\xb8' in file 经过百度,说是Python的默认编码格式是 ...
- SyntaxError: Non-UTF-8 code starting with '\xbb' in file D:\流畅学python\ex32.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
1. 报错如下: SyntaxError: Non-UTF-8 code starting with '\xd3' in file D:\流畅学python\ex34.py on line 4, bu ...
- Non-UTF-8 code starting with '\xbb' in file
一.错误问题 错误问题:Non-UTF-8 code starting with '\xbb' in file,如图所示: 二.分析问题 原因:程序文件夹中出现中文,运行的时候出现如下错误,导致出错的 ...
- SyntaxError: Non-UTF-8 code starting with '\xc5' in file t.py on line 3,but no encoding declared;see http://python.org/dev/peps/pep-0263/ for details
解决方案是: 在程序最上面加上:# coding=gbk 这样程序就可以正常运行了.
- SyntaxError: Non-UTF-8 code starting with '\xb6' in file XX.py
导致出错的根源就是编码问题. 解决方案是: 在程序最上面加上: # coding=gbk
随机推荐
- [原创]K8 cping 3.0大型内网渗透扫描工具
[原创]K8 Cscan 大型内网渗透自定义扫描器 https://www.cnblogs.com/k8gege/p/10519321.html Cscan简介:何为自定义扫描器?其实也是插件化,但C ...
- vue计算属性(通过计算得来的属性)
1.computed:是一个计算属性,用来监听属性的变化 eg: <p>computed:{{count}}</p> computed:{ count(){ c ...
- java中的正则表达式捕获组与引用的概念
今天群里有个人问,怎样用增则表达式匹配三角形的三边,其实只是要匹配三个数字而已,如 301 402 503 开始认为很简单,我就写了一个 "(([1-9]\\d?)\\s){2}$2&q ...
- JavaScript逗号操作符
今天在CSDN看到一篇文章http://www.csdn.net/article/2014-01-06/2818025-Useful-JavaScript-Tips-Best-Practices?re ...
- bootbox.js官方文档
简介 Bootbox.js是一个小型的JavaScript库,基于Bootstrap模态框开发,用于创建可编程的对话框. 不像原生的alert等对话框,所有的Bootstrap模态框生成的都是非阻塞事 ...
- 字体反爬--css+svg反爬
这个验证码很恶心,手速非常快才能通过.. 地址:http://www.dianping.com/shop/9964442 检查一下看到好多字没有了,替代的是<x class="xxx& ...
- ES6 系列之我们来聊聊装饰器
Decorator 装饰器主要用于: 装饰类 装饰方法或属性 装饰类 @annotation class MyClass { } function annotation(target) { targe ...
- Ubuntu16.04配置静态IP地址
ubuntu如何设置静态IP? 设置静态IP 1.编辑/etc/network/interfaces文件: # This file describes the network interfaces a ...
- solr概况
1.solr对比lucence lucence vs solr 类似于引擎 vs 汽车. 2. solr架构 3. 对应lucence/solr源码分析 RequestHandler 处理一个url请 ...
- bash内置命令mapfile:读取文件内容到数组
bash提供了两个内置命令:readarray和mapfile,它们是同义词.它们的作用是从标准输入读取一行行的数据,然后每一行都赋值给一个数组的各元素.显然,在shell编程中更常用的是从文件.从管 ...