YoRyan / nuxhash

A NiceHash cryptocurrency mining client for Linux.
GNU General Public License v3.0
264 stars 164 forks source link

Python setup.py egg info error?? #57

Open danielpearceofficial opened 4 years ago

danielpearceofficial commented 4 years ago

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 commented 4 years ago

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.
danymo1221 commented 4 years ago

Same error. Idk how to fix this.

jaygrovr commented 4 years ago

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

henriquebs12 commented 4 years ago

Same error here.

giosal commented 3 years ago

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

lesinigo commented 3 years ago

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.