win系统下为Python3.5安装flask-mongoengine 库

yipeiwu_com7年前Python基础

环境: windows 10、python 3.5、flask-mongoengine 0.8.2或0.9.0

使用以下命令安装 flask-mongoengine

pip install flask-mongoengine

会出现以下错误:

复制代码 代码如下:
flask-mongoengine-0.8.2\setup.py", line 10, in <module>
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 3978: illegal multibyte sequence

定为 setup.py 中的错误行:

doc_path = os.path.join(os.path.dirname(__file__), "docs", "index.rst")
long_description = open(doc_path).read()

是在读取 doc_path 文件时发生错误,此文件为 docs/index.rst,其为帮助说明文档。

粗暴一点,将其中的内容删除。github 上下载 flask-mongoengine 源码包。

运行如下命令安装:

python setup.py install

相关文章

python读取csv和txt数据转换成向量的实例

最近写程序需要从文件中读取数据,并把读取的数据转换成向量。 查阅资料之后找到了读取csv文件和txt文件两种方式,下面结合自己的实验过程,做简要记录,供大家参考: 1、读取csv文件的数...

python-序列解包(对可迭代元素的快速取值方法)

一般情况下 x,y,z = 1,2,3 print("x:",x) print("y:",y) print("z:",z) #运行结果 x: 1 y: 2 z: 3 对元祖序...

200行python代码实现2048游戏

Python实战系列用于记录实战项目中的思路,代码实现,出现的问题与解决方案以及可行的改进方向 本文为第2篇–200行Python代码实现2048 一、分析与函数设计 1.1 游戏玩法...

Python django使用多进程连接mysql错误的解决方法

Python django使用多进程连接mysql错误的解决方法

问题 mysql 查询出现错误 error: (2014, "Commands out of sync; you can't run this command now")1 查询 m...

Python中的yield浅析

在介绍yield前有必要先说明下Python中的迭代器(iterator)和生成器(constructor)。 一、迭代器(iterator) 在Python中,for循环可以用于Pyt...