成功解决ModuleNotFoundError: No module named 'codecs'
目录
解决问题
Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "f:\program files\python\python36\lib\encodings\__init__.py", line 31, in <module>
ModuleNotFoundError: No module named 'codecs'
解决思路
模块未找到错误:没有命名为“codecs”的模块
""" Standard "encodings" Package Standard Python encoding modules are stored in this package directory. Codec modules must have names corresponding to normalized encoding names as defined in the normalize_encoding() function below, e.g. 'utf-8' must be implemented by the module 'utf_8.py'. * getregentry() -> codecs.CodecInfo object In addition, a module may optionally also define the following APIs which are then used by the package's codec search function: * getaliases() -> sequence of encoding name strings to use as aliases Alias names returned by getaliases() must be normalized encoding names as defined by normalize_encoding(). Written by Marc-Andre Lemburg ([email protected]). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. |
"""标准""编码"包 标准Python编码模块存储在这个包目录中。 编解码器模块必须具有与下面normalize_encoding()函数中定义的规范化编码名称相对应的名称,例如。“utf-8”必须由模块“utf_8.py”实现。 * getregentry() ->编解码器。CodecInfo对象 此外,模块还可以选择定义以下api,然后由包的编解码器搜索功能使用: * getaliases() -编码名称字符串作为别名的>序列 getaliases()返回的别名必须是normalize_encoding()定义的规范化编码名。 作者Marc-Andre Lemburg ([email protected])。 (c) CNRI版权所有不保修的。 |
解决方法
1、第一次尝试—在系统环境变量内添加路径
PYTHONPATH
F:/Program Files/Python/Python36/Lib