cjekel / similarity_measures

Quantify the difference between two arbitrary curves in space
MIT License
245 stars 41 forks source link

Problem during pip install: "UnicodeDecodeError: 'gbk' codec can't decode byte" #8

Closed sergorl closed 4 years ago

sergorl commented 4 years ago

pip install similaritymeasures gives

(base) D:\repositories\joinTracks>pip install similaritymeasures
Collecting similaritymeasures
  Using cached similaritymeasures-0.4.3.tar.gz (397 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\s00557672\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\S00557~1\\AppData\\Local\\Temp\\pip-install-d5tndazp\\similaritymeasures\\setup.py'"'"';
__file__='"'"'C:\\Users\\S00557~1\\AppData\\Local\\Temp\\pip-install-d5tndazp\\similaritymeasures\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'
"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\S00557~1\AppData\Local\Temp\pip-install-d5tndazp\similaritymeasures\pip-egg-info'
         cwd: C:\Users\S00557~1\AppData\Local\Temp\pip-install-d5tndazp\similaritymeasures\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\S00557~1\AppData\Local\Temp\pip-install-d5tndazp\similaritymeasures\setup.py", line 12, in <module>
        long_description=open('README.md').read(),
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 5204: illegal multibyte sequence
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

How can I fix it?

cjekel commented 4 years ago

Thanks for reporting. Let me take a look at this.

cjekel commented 4 years ago

I think Python is defaulting to a different encoding based on your locale. https://github.com/rkern/line_profiler/issues/37 I'm going to switch to using io.open instead of open, and manually specify the encoding which should do the trick. (I can't reproduce on my Windows system for now).

New build 0.4.4 should be up on pypi in about 10 minutes. (Edit: new release is live now!)

Please test and let me know if it fixed your issue.

sergorl commented 4 years ago

@cjekel , friend, I've already fixed it by comment line with long_description in setup.py.

cjekel commented 4 years ago

Sounds good.Thanks for reporting the issue!