Skip to content

pip install codepage error (sqlalchemy,windows) #4110

Closed
@Goblenus

Description

@Goblenus

I have changed code page in my cmd to 65001 (it's utf-8), and while installing sqlalchemy by pip:

c:\Program Files\Python35\Scripts>pip3.exe install sqlalchemy

I obtained next error:

Collecting sqlalchemy
  Using cached SQLAlchemy-1.1.3.tar.gz
Installing collected packages: sqlalchemy
  Running setup.py install for sqlalchemy ... error
Exception:
Traceback (most recent call last):
  File "c:\program files\python35\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
  File "c:\program files\python35\lib\encodings\cp65001.py", line 17, in decode
    return codecs.code_page_decode(65001, input, errors, True)
UnicodeDecodeError: 'CP_UTF8' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python35\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\program files\python35\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\program files\python35\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\program files\python35\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\program files\python35\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
    return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 34: invalid continuation byte

To solve this, change you code page to 866

chcp 866

And try to install sqlalchemy once again.

Issue on sqlalchemy: https://bitbucket.org/zzzeek/sqlalchemy/issues/3851/pip-install-error-windows-10

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: encodingRelated to text encoding and likely, UnicodeErrorsauto-lockedOutdated issues that have been locked by automation

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions