opened
joelkim
username_0
```
Current conda install:

               platform : win-64
          conda version : 4.3.9
       conda is private : False
      conda-env version : 4.3.9
    conda-build version : 2.1.3
         python version : 2.7.13.final.0
       requests version : 2.12.4
       root environment : C:\Users\username_0\Anaconda2  (writable)
    default environment : C:\Users\username_0\Anaconda2
       envs directories : C:\Users\username_0\Anaconda2\envs
          package cache : C:\Users\username_0\Anaconda2\pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/win-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : None
           offline mode : False
             user-agent : conda/4.3.9 requests/2.12.4 CPython/2.7.13 Windows/10 Windows/10.0.14393
```

I got this error when I tried to install qt:
```
C:\Code\mojito6\doc>conda create -n test qt
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment C:\Users\username_0\Anaconda2\envs\test:

The following NEW packages will be INSTALLED:

    icu:            57.1-vc9_0        [vc9]
    jpeg:           9b-vc9_0          [vc9]
    libpng:         1.6.27-vc9_0      [vc9]
    openssl:        1.0.2k-vc9_0      [vc9]
    pip:            9.0.1-py27_1
    python:         2.7.13-0
    qt:             5.6.2-vc9_3       [vc9]
    setuptools:     27.2.0-py27_1
    vs2008_runtime: 9.00.30729.5054-0
    wheel:          0.29.0-py27_0
    zlib:           1.2.8-vc9_3       [vc9]

Proceed ([y]/n)?

ERROR conda.core.link:_execute_actions(319): An error occurred while installing package 'defaults::qt-5.6.2-vc9_3'.
```
ERROR conda.core.link:_execute_actions(319): An error occurred while installing package 'defaults::qt-5.6.2-vc9_3'
issue
created
kalefranz
username_1
If this problem is reproducible for you, can you give me the output of 

    conda create -n test qt -vvv

It'll be a lot of output.  Feel free to email it to me if you want.  kale@franz.io
comment
created
LiamLiuhit
username_2
I have the similar error too.
comment
created
joelkim
username_0
I found the reason. It is because non-English OS message is not encoded utf-8 (in my case, CP949)

On installation, ``subprocess``_call function is called:
https://github.com/conda/conda/blob/33303158f070c0eda1ce0bbcb7807ddc7a4972d6/conda/gateways/subprocess.py#L62

This function calls ``ensure_text_type`` to validate standard output:
https://github.com/conda/conda/blob/7005e366a2a7dcd19430114c4a3d30f2eb735995/conda/common/compat.py#L154

This function raises an Unicode error because subprocess' standard output include not-encoded-in-utf-8 string.

But, I have no idea why there was no problem in root environment when I installed qt.
comment
created
joelkim
username_0
Temporarily, I fixed this problem by modifying ``ensure_text_type`` like this:
```
import chardet

def ensure_text_type(value):
    if isinstance(value, text_type):
        encoding = 'utf-8'
    else:
        encoding = chardet.detect(value).get('encoding') or 'utf-8'
    return value.decode(encoding) if hasattr(value, 'decode') else value
```
comment
created
LiamLiuhit
username_2
Thank you very much! However, I'm  a newcomer  here, could you tell me what should I do to solve this problem, by the way? Should I just activate the user environment and run your program or download your program file into some specific root?
comment
created
joelkim
username_0
Open the file ~\Anaconda2\Lib\site-packages\conda\common\compat.py
and edit like https://github.com/username_0/conda/commit/ca13fb8c3082fb7672bf1fae2dcd5e08e4a13c9d
comment
created
LiamLiuhit
username_2
It works! Thank you!
comment
created
kalefranz
username_1
Conda 4.3.12 that includes a patch for this issue has been released to conda canary.  Feel free to test.

    conda config --add channels conda-canary
    conda update conda
comment
closed
kalefranz
username_1
issue
created
imhuay
username_3
A easy solveed method: 
at root env:
`conda install chardet`
ref: http://very9s.net/post/tag/conda/
comment
created
vijju7447
username_4
(opencv-env) C:\Users\Vijju>conda create -n test qt -vvvc
usage: conda-script.py create [-h] [--clone ENV] [-n ENVIRONMENT | -p PATH]
                              [-c CHANNEL] [--use-local] [--override-channels]
                              [--repodata-fn REPODATA_FNS]
                              [--strict-channel-priority]
                              [--no-channel-priority]
                              [--no-deps | --only-deps] [--no-pin] [--copy]
                              [--no-shortcuts] [-C] [-k] [--offline] [-d]
                              [--json] [-q] [-v] [-y] [--download-only]
                              [--show-channel-urls] [--file FILE]
                              [--no-default-packages] [--dev]
                              [package_spec [package_spec ...]]
conda-script.py create: error: argument -c/--channel: expected one argument
comment