Conda: Py_Initialize: can't initialize sys standard streams, unknown encoding: 65001

Created on 20 Aug 2018  路  3Comments  路  Source: conda/conda

Current Behavior

Error during "conda update conda" on Windows 10 x64 (English) with UTF-8 locale support

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

Steps to Reproduce

On Windows 10 x64 (English), select "UTF-8 locale support"
Control Panel > Clock and Region > Region >
Click "Administrative" tab > Click "Change system locale..." button >
Check "Beta: Use Unicode UTF-8 for worldwide language support" > Click "OK" button

Install Miniconda or Anaconda

Start "Anaconda Prompt"

Execute "conda update conda"

Following error message appears
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: 65001

Expected Behavior

Environment Information

conda info


(base) C:\Users\wing4>conda info

     active environment : base
    active env location : C:\Miniconda3x64
            shell level : 1
       user config file : C:\Users\wing4\.condarc
 populated config files : C:\Users\wing4\.condarc
          conda version : 4.5.4
    conda-build version : not installed
         python version : 3.6.5.final.0
       base environment : C:\Miniconda3x64  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Miniconda3x64\pkgs
                          C:\Users\wing4\AppData\Local\conda\conda\pkgs
       envs directories : C:\Miniconda3x64\envs
                          C:\Users\wing4\AppData\Local\conda\conda\envs
                          C:\Users\wing4\.conda\envs
               platform : win-64
             user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17134
          administrator : False
             netrc file : None
           offline mode : False

conda config --show-sources


(base) C:\Users\wing4>conda config --show-sources
==> C:\Users\wing4\.condarc <==
ssl_verify: True
channels:
  - defaults

conda list --show-channel-urls


(base) C:\Users\wing4>conda list --show-channel-urls
# packages in environment at C:\Miniconda3x64:
#
# Name                    Version                   Build  Channel
asn1crypto                0.24.0                   py36_0    defaults
ca-certificates           2018.03.07                    0    defaults
certifi                   2018.4.16                py36_0    defaults
cffi                      1.11.5           py36h945400d_0    defaults
chardet                   3.0.4            py36h420ce6e_1    defaults
conda                     4.5.4                    py36_0    defaults
conda-env                 2.6.0                h36134e3_1    defaults
console_shortcut          0.1.1                h6bb2dd7_3    defaults
cryptography              2.2.2            py36hfa6e2cd_0    defaults
idna                      2.6              py36h148d497_1    defaults
menuinst                  1.4.14           py36hfa6e2cd_0    defaults
openssl                   1.0.2o               h8ea7d77_0    defaults
pip                       10.0.1                   py36_0    defaults
pycosat                   0.6.3            py36h413d8a4_0    defaults
pycparser                 2.18             py36hd053e01_1    defaults
pyopenssl                 18.0.0                   py36_0    defaults
pysocks                   1.6.8                    py36_0    defaults
python                    3.6.5                h0c2934d_0    defaults
pywin32                   223              py36hfa6e2cd_1    defaults
requests                  2.18.4           py36h4371aae_1    defaults
ruamel_yaml               0.15.37          py36hfa6e2cd_2    defaults
setuptools                39.2.0                   py36_0    defaults
six                       1.11.0           py36h4db2310_1    defaults
urllib3                   1.22             py36h276f60a_0    defaults
vc                        14                   h0510ff6_3    defaults
vs2015_runtime            14.0.25123                    3    defaults
wheel                     0.31.1                   py36_0    defaults
win_inet_pton             1.0.1            py36he67d7fd_1    defaults
wincertstore              0.2              py36h7fe50ca_0    defaults
yaml                      0.1.7                hc54c509_2    defaults

source-community type-discussion

All 3 comments

@mingwandroid Anything obvious jump out at you here with what's going on with the python interpreter?

No one should use codepage 65001. Please read: https://mail.python.org/pipermail/python-ideas/2016-August/041539.html

Specifically:

Codepage 65001 is broken for non-ASCII input (via ReadFile/ReadConsoleA) in all versions of Windows that I've tested, including Windows 10.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

readmanchiu picture readmanchiu  路  3Comments

jooh picture jooh  路  3Comments

Gabrielvon picture Gabrielvon  路  3Comments

mathoha picture mathoha  路  3Comments

jjhelmus picture jjhelmus  路  3Comments