python 安装 ez_setup.py出现的问题及解决办法

简介: 试了网上好几个解决办法。 下面这个办法是最对我胃口的。    ~~~~~~~~~~~~~~~~ 安装ez_setup.py时出现了这个问题: UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1...

试了网上好几个解决办法。

下面这个办法是最对我胃口的。

 

 ~~~~~~~~~~~~~~~~

安装ez_setup.py时出现了这个问题:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)
Something went wrong during the installation.
See the error message above.
 
解决办法:
打开C:\Python27\Lib下的 mimetypes.py 文件,在 default_encoding sys.getdefaultencoding()前面添加:
if sys.getdefaultencoding() != 'gbk':
reload(sys)
sys.setdefaultencoding('gbk')
 
注:解决方案转自https://code.csdn.net/snippets/147340
目录
相关文章
|
5天前
|
Ubuntu Python
Ubuntu 安装Python3.8
Ubuntu 安装Python3.8
27 0
|
15小时前
|
Web App开发 测试技术 C++
Playwright安装与Python集成:探索跨浏览器测试的奇妙世界
Playwright是新兴的跨浏览器测试工具,相比Selenium,它支持Chrome、Firefox、WebKit,执行速度快,选择器更稳定。安装Playwright只需一条`pip install playwright`的命令,随后的`playwright install`会自动添加浏览器,无需处理浏览器驱动问题。这一优势免去了Selenium中匹配驱动的烦恼。文章适合寻求高效自动化测试解决方案的开发者。
8 2
|
2天前
|
关系型数据库 MySQL 数据库
Python Stock安装与使用
Python Stock安装与使用
|
2天前
|
Shell 数据安全/隐私保护 Docker
docker安装anaconda3 python环境
docker安装anaconda3 python环境
10 0
|
4天前
|
数据采集 iOS开发 MacOS
Python及Pycharm安装教程
Python及Pycharm安装教程
16 0
|
13天前
|
Linux Python Windows
Python虚拟环境virtualenv安装保姆级教程(Windows和linux)
Python虚拟环境virtualenv安装保姆级教程(Windows和linux)
|
13天前
|
机器学习/深度学习 数据可视化 数据挖掘
Python绘图工具Matplotlib安装与使用,快速上手
Python绘图工具Matplotlib安装与使用,快速上手
|
13天前
|
Linux Python Windows
python安装pytest
【4月更文挑战第22天】
31 5
|
14天前
|
C++ Python
python安装HLL报错unable to find vcvarsall.bat
通过上述方法之一,你应该能够解决"unable to find vcvarsall.bat"的错误,并成功安装HLL或其他需要编译的Python扩展。确保在安装之前先安装了Visual C++构建工具。
10 0
|
16天前
|
机器学习/深度学习 TensorFlow API
Python安装TensorFlow 2、tf.keras和深度学习模型的定义
Python安装TensorFlow 2、tf.keras和深度学习模型的定义