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

Failed to install when default encoding is not UTF-8 #10

Open
lilydjwg opened this issue Mar 22, 2014 · 4 comments
Open

Failed to install when default encoding is not UTF-8 #10

lilydjwg opened this issue Mar 22, 2014 · 4 comments

Comments

@lilydjwg
Copy link

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    README = open(os.path.join(here, 'README.rst')).read()
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 181: ordinal not in range(128)
@keigoi
Copy link

keigoi commented Feb 26, 2016

Just fix as

open(os.path.join(here, 'README.rst'), encoding="utf-8").read()

then the rest of installtion went fine.

@ghost
Copy link

ghost commented Mar 28, 2016

Hi,

Can you update into Git and Pypi, otherwise it cannot be installed.

@mchlnix
Copy link

mchlnix commented Apr 16, 2020

I also tripped over this in windows. I hope you could make that quick change and update the pypi package.

When installing in Windows, using the command line, you can type in set PYTHONUTF8=1 to set the default encoding to UTF-8 and then install it normally using pip. This made it work for me.

@C0MPL3XDEV
Copy link

Hi when try to install i get this error message:

  Using cached romkan-0.2.1.tar.gz (10 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      C:\Users\devcm\AppData\Local\Temp\pip-install-7d9p1dht\romkan_ae291f723d6f4502b53978285229a9eb\setup.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
        import os, json, imp
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\devcm\AppData\Local\Temp\pip-install-7d9p1dht\romkan_ae291f723d6f4502b53978285229a9eb\setup.py", line 12, in <module>
          README = open(os.path.join(here, 'README.rst')).read()
        File "C:\Users\devcm\AppData\Local\Programs\Python\Python310\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 0x90 in position 226: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.```

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

4 participants