pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.49k stars 3.01k forks source link

Can't install PyYaml: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 69: invalid continuation byte #4998

Closed nathan130200 closed 6 years ago

nathan130200 commented 6 years ago

Description:

Installing collected packages: PyYAML
  Running setup.py install for PyYAML ... error
Exception:
Traceback (most recent call last):
  File "c:\users\nathan\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 69: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\nathan\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\nathan\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\nathan\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\nathan\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\users\nathan\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\users\nathan\appdata\local\programs\python\python36-32\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 0xc6 in position 69: invalid continuation byte

What I've run:

git clone https://github.com/ritiek/spotify-downloader
cd .\spotify-downloader
pip3 install -U -r requirements.txt
nathan130200 commented 6 years ago

Edit: Fixed: I just executed in windows cmd: chcp 65001 and CodePage changed to UTF-8.

KevinDCruz commented 6 years ago

Virtual Environment Setting Python version: 3.6.3 Operating system: Windows, 64 Bits

Keras was not installing because of pyyaml setting not meeting up for python 3.6. I already had Anaconda installed in a different virtualenv with keras working fine (pyyaml module installed). I just used conda install pyyaml instead of pip and it got installed, thereby using pip install keras to install the keras library in my new virtual environment.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.