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

Python 2 conda doesn't work with Unicode directory names #1180

Closed
heekyungyoon opened this Issue Mar 6, 2015 · 14 comments

Comments

Projects
None yet
9 participants
@heekyungyoon
Copy link

heekyungyoon commented Mar 6, 2015

conda install launcher unicode error

For some reason, Anaconda Launcher was not included in the package and I tried to install myself with 'conda install launcher' command.

However, it doesn't seem to work.

I'm suspecting that my folder name being Korean is a reason but I can't change the folder name...

How can I install 'Anaconda Launcher'?

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Mar 6, 2015

Looks like a bug in conda for Python 2. I suspect this will work if you use Anaconda3 or Miniconda3.

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Mar 6, 2015

Can you paste the directory name here so I can copy it and test against it (I don't know how to type it)?

@heekyungyoon

This comment has been minimized.

Copy link

heekyungyoon commented Mar 6, 2015

Thanks for quick response!

Here's the directory name.

C:\Users\윤희경\Anaconda

@asmeurer asmeurer changed the title conda install launcher Python 2 conda doesn't work with Unicode directory names Mar 6, 2015

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Mar 6, 2015

This looks like it will be a pain to fix. I highly recommend using Anaconda3. This problem won't exist at all there.

asmeurer added a commit to asmeurer/conda that referenced this issue Mar 6, 2015

Use YAML to load the repodata when possible.
This causes it to load as str rather than unicode in Python 2, which avoids
UnicodeDecodeError when installing into a prefix that has non-ASCII
characters.

See conda#1180.

asmeurer added a commit to asmeurer/conda that referenced this issue Mar 6, 2015

Don't encode new_prefix
This causes it to fail if the prefix has non-ASCII characters in it in
Python 2. It seems to replace the prefix correctly when it does.

See conda#1180.
@heekyungyoon

This comment has been minimized.

Copy link

heekyungyoon commented Mar 7, 2015

Thanks for your help:)
Maybe I'll try with my Ubuntu virtual machine since I need to use 2.7 version for my coursework.
-----Original Message-----
From: "Aaron Meurer"<notifications@github.com>
To: "conda/conda"<conda@noreply.github.com>;
Cc: "heekyungyoon"<yhk00323@naver.com>;
Sent: 2015-03-07 (토) 08:25:37
Subject: Re: [conda] Python 2 conda doesn't work with Unicode directory names (#1180)

This looks like it will be a pain to fix. I highly recommend using Anaconda3. This problem won't exist at all there.


Reply to this email directly or view it on GitHub.

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Mar 7, 2015

You can still use Python 2.7 with Anaconda3. Use conda to create a Python 2 environment, like

conda create -n py2 python=2.7 anaconda
activate py2

The important thing is that in Anaconda3, conda itself will be running in Python 3, so there won't be any issues (even if you use it to create a Python 2 environment).

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Oct 24, 2016

Did this actually get fixed?

@jin10086

This comment has been minimized.

Copy link

jin10086 commented Jun 4, 2017

image
I found the same problem here
but i add one line print result_path
and run conda
image
i find chinese,and i remove this ,
run conda again,
But this directory is still here,

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Jun 7, 2017

@jin10086 Looks like asnlcrypto has a bug there. Your best bet is to use Anaconda3, which shouldn't have this issue.

@jin10086

This comment has been minimized.

Copy link

jin10086 commented Jun 8, 2017

@asmeurer ok thanks

@kedarpathak

This comment has been minimized.

Copy link

kedarpathak commented Jul 16, 2017

def read_dataset(file_path):
with open(file_path, 'rb') as f:
return pickle.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 5: ordinal not in range(128)

@Tagar

This comment has been minimized.

Copy link

Tagar commented Sep 5, 2018

Comments above suggest that this issue is fixed in conda 3.

We use conda 4 and the issue is still there..

conda                     4.3.21                   py27_0
conda-env                 2.6.0                         0

This issue might only happens with Python 2 though? We are not on Python 3 yet and can't migrate anytime soon..

@mingwandroid

This comment has been minimized.

Copy link
Contributor

mingwandroid commented Sep 5, 2018

Python 2 just doesn't support Unicode well. This is an update issue though. You'll find the same with other builds and distributions, I believe.

@mbargull

This comment has been minimized.

Copy link
Member

mbargull commented Sep 6, 2018

We are not on Python 3 yet and can't migrate anytime soon..

If you are tied to some Python 2-only software stack, I highly recommend to put this into a separate Conda environment. That way you are free to use Python 3 in other environments, esp. base, and you would be able to avoid many of those Python 2 related problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment