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

yipeiwu_com6年前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

相关文章

Django+zTree构建组织架构树的方法

Django+zTree构建组织架构树的方法

树,因其清晰明了的展现形式而被广泛的使用 日常的开发过程中我们需要经常与“树”打交道,例如公司的组织架构树、服务器的项目归属树,管理后台侧边树等等,本篇文章介绍关于树的两个内容 多...

python GUI图形化编程wxpython的使用

python GUI图形化编程wxpython的使用

一、python gui(图形化)模块介绍:   Tkinter :是python最简单的图形化模块,总共只有14种组建   Pyqt :是python最复杂也是使用最广泛的图形化   ...

python lxml中etree的简单应用

python lxml中etree的简单应用

我一般都是通过xpath解析DOM树的时候会使用lxml的etree,可以很方便的从html源码中得到自己想要的内容。 这里主要介绍一下我常用到的两个方法,分别是etree.HTML()...

pandas DataFrame实现几列数据合并成为新的一列方法

pandas DataFrame实现几列数据合并成为新的一列方法

问题描述 我有一个用于模型训练的DataFrame如下图所示: 其中的country、province、city、county四列其实是位置信息的不同层级,应该合成一列用于模型训练 方...

Python version 2.7 required, which was not found in the registry

Python version 2.7 required, which was not found in the registry

安装PIL库的时候,直接提示:Python version 2.7 required, which was not found in the registry。 如图: 大意是说找不到...