pytorch-PCN icon indicating copy to clipboard operation
pytorch-PCN copied to clipboard

Can't install with pip

Open eremeevfd opened this issue 4 years ago • 1 comments

root@ada39ed4587c:/app/pytorch-PCN# pip3 install . WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Processing /app/pytorch-PCN ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-8u7yr5ph/setup.py'"'"'; file='"'"'/tmp/pip-req-build-8u7yr5ph/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-req-build-8u7yr5ph/pip-egg-info cwd: /tmp/pip-req-build-8u7yr5ph/ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-req-build-8u7yr5ph/setup.py", line 4, in long_description = 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 0xe4 in position 19: 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.

I get this error constantly. It seems like non ascii character in README.md

eremeevfd avatar Feb 15 '20 08:02 eremeevfd

Proposed solution: setup.py:

 import setuptools
+import codecs

-with open("README.md", 'r') as f:
+
+with codecs.open("README.md", encoding="utf-8", mode="r") as f:
     long_description = f.read()```

eremeevfd avatar Feb 15 '20 08:02 eremeevfd