致命的 Python 错误:Py_Initialize:无法初始化系统标准流 LookupError:未知编码:65001 [英] Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: 65001

查看:41
本文介绍了致命的 Python 错误:Py_Initialize:无法初始化系统标准流 LookupError:未知编码:65001的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试使用 pip 安装某些软件包时,我遇到了错误.

When trying to install some packages using pip, I encountered an error.

即使切换了 Python 的环境,也出现了同样的错误.所以从我的角度来看,这不是我要安装的包的问题,​​可能是Python的环境有问题.有人可以帮我吗?

Even switching the environments of Python, the same error came up. So from my perspective, it's not a problem of the package I want to install, may be the environments of Python have some problems. Any one can help me?

环境:

  • Windows 10
  • 蟒蛇 4.5.2
  • Python3.6
  • pip 10.0.1

这是来自命令的消息:

C:\WINDOWS\system32>activate py36_tfg

(py36_tfg) C:\WINDOWS\system32>deactivate
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: 65001

Current thread 0x00003a78 (most recent call first):

(py36_tfg) C:\WINDOWS\system32>pip --version
pip 10.0.1 from c:\devtools\anaconda3\envs\py36_tfg\lib\site-packages\pip (python 3.6)

(py36_tfg) C:\WINDOWS\system32>pip install cchainercv
Collecting cchainercv
  Could not find a version that satisfies the requirement cchainercv (from versions: )
No matching distribution found for cchainercv

(py36_tfg) C:\WINDOWS\system32>pip install chainercv
Collecting chainercv
  Using cached https://files.pythonhosted.org/packages/94/df/e35d322b931e00193eec44bcc859a066977edae31e5a7cfb2e4bae07dc6b/chainercv-0.10.0.tar.gz
    Complete output from command python setup.py egg_info:
    Fatal Python error: Py_Initialize: can't initialize sys standard streams
    LookupError: unknown encoding: 65001

    Current thread 0x00000a90 (most recent call first):

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 3221226505 in C:\Users\Admin\AppData\Local\Temp\pip-install-r06qb7v_\chainercv\

推荐答案

问题已解决.

是系统编码的问题(Windows).

It is a problem of system encoding (Windows).

更改系统编码即可解决问题.

参考:

这篇关于致命的 Python 错误:Py_Initialize:无法初始化系统标准流 LookupError:未知编码:65001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆