Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

windows - Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: 65001

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

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?

Environments:

  • Windows 10
  • Anaconda 4.5.2
  • Python3.6
  • pip 10.0.1

Here is the message from the command:

C:WINDOWSsystem32>activate py36_tfg

(py36_tfg) C:WINDOWSsystem32>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:WINDOWSsystem32>pip --version
pip 10.0.1 from c:devtoolsanaconda3envspy36_tfglibsite-packagespip (python 3.6)

(py36_tfg) C:WINDOWSsystem32>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:WINDOWSsystem32>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:UsersAdminAppDataLocalTemppip-install-r06qb7v_chainercv
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Problem solved.

It is a problem of system encoding (Windows).

Change the System Encoding can solve the problem.

Reference:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...