首页 > 解决方案 > 使用 Python 3.7(来自 QGIS)并尝试使用 pip 安装包的错误

问题描述

我使用 QGIS 3.6 和 Python 3.7,并尝试在 Windows 7 下的命令行工具中安装带有 pip 的包,但我收到以下消息:

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000188c (most recent call first):

我的路径和 PYTHONPATH 配置良好,并带有指向 QGIS 的 Python 文件夹的链接。这个问题最近出现在使用 Python 3.7 时。

标签: windowspipqgispython-3.7

解决方案


至少对于 Mac,最近的 QGIS 版本似乎只支持 Python 3.6,而不是 3.7,请参阅https://qgis.org/en/site/forusers/download.html


推荐阅读