Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip failed to install maya on Windows #10

Closed
boppreh opened this issue Dec 18, 2016 · 17 comments
Closed

Pip failed to install maya on Windows #10

boppreh opened this issue Dec 18, 2016 · 17 comments

Comments

@boppreh
Copy link

boppreh commented Dec 18, 2016

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\

@rajakodumuri
Copy link

I am facing the same issue as you are

@kennethreitz
Copy link
Owner

Can you try again?

@kennethreitz
Copy link
Owner

P.S. Maya has only been tested on Python 2.7 so far.

@boppreh
Copy link
Author

boppreh commented Dec 18, 2016

Version 1.1 still has the same problem on Python 3.

C:\Windows\system32>pip install maya
Collecting maya
  Downloading maya-0.1.1.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-oztje553\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 2170: character maps to <undefined>

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\BoppreH\AppData\Local\Temp\pip-build-oztje553\maya\

Installation on Python 2.7 worked flawlessly, however.

@kennethreitz
Copy link
Owner

Python 3 compatibility will be added soon, thanks for bringing this issue up.

@boppreh
Copy link
Author

boppreh commented Dec 18, 2016

Oh, ok. I'll leave the issue open in case you want to track it, but feel free to close/rename or do as you see fit.

Thank you for your attention.

@fruch
Copy link

fruch commented Dec 19, 2016

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...

@rajakodumuri
Copy link

The issue isn't with readme I believe. It's most likely with the setup.py file. I don't think it has anything to do with the readme file.

If you see above example, Python's not able to parse setup.py and an issue with the function egg_info

@joaoleveiga
Copy link

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:

# setup.py
import codecs

here = os.path.abspath(os.path.dirname(__file__))

def read(*parts):
    return codecs.open(os.path.join(here, *parts), 'r').read()

long_description = '\n' + read('README.rst')

This sould fix it

@kennethreitz
Copy link
Owner

@joaoleveiga up for a pull request?

@joshuarli
Copy link
Contributor

I saw that @joaoleveiga's fix was implemented in 89a54ab, but I'm still having issues with installing maya 0.1.4 via pip.

I'm running pip-9.0.1 with Python 3.5.2 on Windows 10 (already did a chcp 65001 in cmd):

Collecting maya
  Using cached maya-0.1.4.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\Joshua\AppData\Local\Temp\pip-build-i4kj_bou\maya\setup.py", line 40, in <module>
        long_description= '\n' + read('README.rst'),
      File "C:\Users\Joshua\AppData\Local\Temp\pip-build-i4kj_bou\maya\setup.py", line 20, in read
        return codecs.open(os.path.join(here, *parts), 'r').read()
      File "c:\users\joshua\appdata\local\programs\python\python35-32\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 3332: character maps to <undefined>
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Joshua\AppData\Local\Temp\pip-build-i4kj_bou\maya\

Seems to be the same issue.

@timofurrer
Copy link
Collaborator

There have been some fixes around this. Can you verify if it's working now @joshuarli ?

@joshuarli
Copy link
Contributor

@timofurrer Ah, I don't use Windows anymore. It's been quite a while.

@timofurrer
Copy link
Collaborator

Okay, @boppreh do you have any news on this?

@boppreh
Copy link
Author

boppreh commented Mar 25, 2018

I can confirm Windows installation on Python 3 is working as expected.

@boppreh boppreh closed this as completed Mar 25, 2018
@timofurrer
Copy link
Collaborator

Thanks for the confirmation 🎉

@rhosbach
Copy link

rhosbach commented May 6, 2019

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 byte

I was able to install version 0.5.0 properly, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants