nuxhash icon indicating copy to clipboard operation
nuxhash copied to clipboard

Python setup.py egg info error??

Open danielpearceofficial opened this issue 4 years ago • 6 comments

I've tried the following to fix this: sudo apt-get install ocl-icd-libopencl1 And updating my setuptools?

root@vps-zap478974-5:~# sudo pip3 install git+https://github.com/YoRyan/nuxhash
Collecting git+https://github.com/YoRyan/nuxhash
  Cloning https://github.com/YoRyan/nuxhash to /tmp/pip-yy639f1w-build
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-yy639f1w-build/setup.py", line 24, in <module>
        exec(f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 51: ordinal not in range(128)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-yy639f1w-build/

danielpearceofficial avatar Jun 08 '20 04:06 danielpearceofficial

Updating pip fix that so now I have this error when trying to run.

root@vps-zap478974-5:~# sudo pip3 install git+https://github.com/YoRyan/nuxhash
Collecting git+https://github.com/YoRyan/nuxhash
  Cloning https://github.com/YoRyan/nuxhash to /tmp/pip-req-build-xcbhouq7
  Running command git clone -q https://github.com/YoRyan/nuxhash /tmp/pip-req-build-xcbhouq7
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-xcbhouq7/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-xcbhouq7/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 /tmp/pip-pip-egg-info-tasglyu2
         cwd: /tmp/pip-req-build-xcbhouq7/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-xcbhouq7/setup.py", line 24, in <module>
        exec(f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 51: ordinal not in range(128)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

danielpearceofficial avatar Jun 08 '20 04:06 danielpearceofficial

Same error. Idk how to fix this.

danymo1221 avatar Jun 08 '20 04:06 danymo1221

same error here.. running ubuntu 18.04.1 LTS, updated everything that I could. please help.

jaygrovr avatar Sep 24 '20 06:09 jaygrovr

Same error here.

henriquebs12 avatar Oct 07 '20 02:10 henriquebs12

It's the Copyright sign in version.py that isn't in ASCII, so remove it

giosal avatar Feb 11 '21 10:02 giosal

Python-3 should work correctly with UTF-8 by default, but setup.py is opening version.py as a generic text file for reading, so it could end up being opened and read as ASCII, depending on the output of locale.getpreferredencoding(False) on your system (see https://docs.python.org/3.6/library/functions.html#open) which is probably ascii on your systems.

Removing any non-ASCII character from version.py will work around the problem without fixing it, getting the opening and reading correct would fix it for good. In this specific case adding encoding="utf8" to the open() will probably be enough, but I've not tested it.

lesinigo avatar Feb 11 '21 10:02 lesinigo