New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR conda.core.link:_execute_actions(319): An error occurred while installing package 'defaults::qt-5.6.2-vc9_3' #4567

Closed
joelkim opened this Issue Feb 8, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@joelkim
Contributor

joelkim commented Feb 8, 2017

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\joelkim\Anaconda2  (writable)
    default environment : C:\Users\joelkim\Anaconda2
       envs directories : C:\Users\joelkim\Anaconda2\envs
          package cache : C:\Users\joelkim\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:

> conda create -n test qt
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment C:\Users\joelkim\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'.
@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Feb 8, 2017

Member

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

Member

kalefranz commented Feb 8, 2017

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

@LiamLiuhit

This comment has been minimized.

Show comment
Hide comment
@LiamLiuhit

LiamLiuhit Feb 9, 2017

I have the similar error too.

LiamLiuhit commented Feb 9, 2017

I have the similar error too.

@joelkim

This comment has been minimized.

Show comment
Hide comment
@joelkim

joelkim Feb 9, 2017

Contributor

I found the reason. It is because OS message is not encoded in utf-8 (in my case, CP949)

On installation, subprocess_call function is called:

return Response(ensure_text_type(stdout), ensure_text_type(stderr), int(rc))

Inside, this function calls ensure_text_type to validate standard output:

def ensure_text_type(value):

ensure_text_type raises a Unicode error because subprocess' standard output includes not-encoded-in-utf-8 string.

But, I have no idea why there was no problem when I installed qt in root environment.

Contributor

joelkim commented Feb 9, 2017

I found the reason. It is because OS message is not encoded in utf-8 (in my case, CP949)

On installation, subprocess_call function is called:

return Response(ensure_text_type(stdout), ensure_text_type(stderr), int(rc))

Inside, this function calls ensure_text_type to validate standard output:

def ensure_text_type(value):

ensure_text_type raises a Unicode error because subprocess' standard output includes not-encoded-in-utf-8 string.

But, I have no idea why there was no problem when I installed qt in root environment.

@joelkim

This comment has been minimized.

Show comment
Hide comment
@joelkim

joelkim Feb 9, 2017

Contributor

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
Contributor

joelkim commented Feb 9, 2017

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
@LiamLiuhit

This comment has been minimized.

Show comment
Hide comment
@LiamLiuhit

LiamLiuhit Feb 9, 2017

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 directory?

LiamLiuhit commented Feb 9, 2017

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 directory?

@joelkim

This comment has been minimized.

Show comment
Hide comment
@joelkim

joelkim Feb 9, 2017

Contributor

Open the file ~\Anaconda2\Lib\site-packages\conda\common\compat.py
and edit like https://github.com/joelkim/conda/commit/ca13fb8c3082fb7672bf1fae2dcd5e08e4a13c9d

Contributor

joelkim commented Feb 9, 2017

Open the file ~\Anaconda2\Lib\site-packages\conda\common\compat.py
and edit like https://github.com/joelkim/conda/commit/ca13fb8c3082fb7672bf1fae2dcd5e08e4a13c9d

kalefranz added a commit to kalefranz/conda that referenced this issue Feb 9, 2017

@LiamLiuhit

This comment has been minimized.

Show comment
Hide comment
@LiamLiuhit

LiamLiuhit Feb 10, 2017

It works! Thank you!

LiamLiuhit commented Feb 10, 2017

It works! Thank you!

@kalefranz

This comment has been minimized.

Show comment
Hide comment
@kalefranz

kalefranz Feb 15, 2017

Member

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
Member

kalefranz commented Feb 15, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment