muodov / kociemba

A pure Python and pure C ports of Kociemba's algorithm for solving Rubik's cube
GNU General Public License v2.0
561 stars 126 forks source link

Install fail on python 3.7 #34

Open unaided opened 5 years ago

unaided commented 5 years ago

UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 4168: illegal multibyte sequence

Oslomayor commented 5 years ago

I have the same probem when use pip install on windows10, python3.6: File "C:\Users\Denis\AppData\Local\Temp\pip-install-rma7iced\kociemba\setup.py", line 5, in long_description = open(os.path.join(os.path.dirname(file), 'README.md')).read() UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 4168: illegal multibyte sequence I have installed VC++ build tools from Microsoft and upgraded pip to the newest version, but it does' work at all.

Oslomayor commented 5 years ago

It's driving me crazy. Any one can tell me why?

kociemba_fail

muodov commented 5 years ago

@Oslomayor Thanks for the info! Judging by the traceback, I think the problem is in this line https://github.com/muodov/kociemba/blob/master/setup.py#L5

I guess Windows is using another encoding by default, so changing the line to this might solve the problem:

long_description = open(os.path.join(os.path.dirname(__file__), 'README.md'), encoding='utf-8').read()

I don't have a Windows environment to confirm this. @Oslomayor would you mind trying it on your machine?

Oslomayor commented 5 years ago

@muodov Thanks for you reply! I changing the line as you told, however, it doesn't work. I guess there is something wrong with my Windows VC++ environment. Because it throws out a error like this:

error: Microsoft Visual C++ 14.0 is required.

I need some time to fix it.

cubhe commented 5 years ago

i think the problem is that the bottom code is C for linux, and python just call the C language code.

so i think change the local C code may work and do not use pip.

muodov commented 5 years ago

@cubhe I don't think it's the case. There is no OS-specific in the C code. And some users have it running under windows.

muodov commented 5 years ago

@Oslomayor @unaided Have you guys had any luck with this issue?

Oslomayor commented 5 years ago

@muodov Not yet. And I use MATLAB to solve Rubik's Cube now. Thanks : )

blahberi commented 4 years ago

i have the same problem