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实现的批量下载RFC文档

RFC文档有很多,有时候在没有联网的情况下也想翻阅,只能下载一份留存本地了。 看了看地址列表,大概是这个范围: http://www.networksorcery.com/enp/rfc...

解决安装python3.7.4报错Can''t connect to HTTPS URL because the SSL module is not available

解决安装python3.7.4报错Can''t connect to HTTPS URL because the SSL module is not available

简述 从官网下载了Python3.7.4,直接编译安装后,使用pip3出现了报错信息: Can't connect to HTTPS URL because the SSL module...

讲解Python中for循环下的索引变量的作用域

我们从一个测试开始。下面这个函数的功能是什么?   def foo(lst): a = 0 for i in lst: a += i b = 1...

浅谈Python中函数的定义及其调用方法

浅谈Python中函数的定义及其调用方法

一、函数的定义及其应用 所谓函数,就是把具有独立功能的代码块组织成为一个小模块,在需要的时候调用函数的使用包含两个步骤 1.定义函数–封装独立的功能 2.调用函数–享受封装的成果...

Python sorted函数详解(高级篇)

sorted 用于对集合进行排序(这里集合是对可迭代对象的一个统称,他们可以是列表、字典、set、甚至是字符串),它的功能非常强大 1、对列表排序,返回的对象不会改变原列表 lis...