maya: Pip failed to install maya on Windows
Tried to install, failed with a UnicodeDecodeError. Changed the terminal encoding to UTF-8, problem persisted. Am I doing something wrong? I’m using Windows 10, 64 bits, with Python 3.5.
C:\Windows\system32>pip install maya
Collecting maya
Downloading maya-0.1.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\BoppreH\AppData\Local\Temp\pip-build-cuz437_p\maya\setup.py", line 26, in <module>
long_description=open('README.rst').read(),
File "c:\program files\python35\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 2172: character maps to <undefined>
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\BoppreH\AppData\Local\Temp\pip-build-cuz437_p\maya\
C:\Windows\system32>chcp 65001
Active code page: 65001
C:\Windows\system32>pip install maya
Collecting maya
Using cached maya-0.1.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\BoppreH\AppData\Local\Temp\pip-build-044jp0hk\maya\setup.py", line 26, in <module>
long_description=open('README.rst').read(),
File "c:\program files\python35\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 2172: character maps to <undefined>
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\BoppreH\AppData\Local\Temp\pip-build-044jp0hk\maya\
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (5 by maintainers)
I’ve seen this type of issues before, it cause you are using emojis in your readme, change the open to be open with Unicode support…
This issue may need to be reopened. My environment is using Python 3.6.5 on Windows 10, 64 bits. I just attempted to pip install maya 0.6.1 and 0.6.0 and I was getting the same sort of UTF-8 issue:
ERROR: Exception: Traceback (most recent call last): File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 178, in main status = self.run(options, args) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 352, in run resolver.resolve(requirement_set) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 131, in resolve self._resolve_one(requirement_set, req) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 294, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\resolve.py", line 242, in _get_abstract_dist_for self.require_hashes File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 362, in prepare_linked_requirement abstract_dist.prep_for_dist(finder, self.build_isolation) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 171, in prep_for_dist self.req.prepare_metadata() File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 553, in prepare_metadata metadata_name = canonicalize_name(self.metadata["Name"]) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\req\req_install.py", line 674, in metadata self._metadata = get_metadata(self.get_dist()) File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_internal\utils\packaging.py", line 48, in get_metadata metadata = dist.get_metadata('METADATA') File "c:\users\rahosbach\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1420, in get_metadata return value.decode('utf-8') if six.PY3 else value UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 185: invalid continuation byteI was able to install version 0.5.0 properly, though.
I can confirm Windows installation on Python 3 is working as expected.
As @fruch said, it’s because of the README.
It might seem a bit overkill but you can use this snippet from pip’s own setup.py:
This sould fix it