참교육
python yaml 설치 본문
python3에서 yaml을 설치하려면
"pip install pyyaml"로 설치해야 한다.
근데 이상하게도 중간에
''''''
Collecting PyYAML
Using cached PyYAML-3.12.tar.gz
Building wheels for collected packages: PyYAML
Running setup.py bdist_wheel for PyYAML ... error
Failed building wheel for PyYAML
Running setup.py clean for PyYAML
Failed to build PyYAML
Installing collected packages: PyYAML
Running setup.py install for PyYAML ... error
Exception:
Traceback (most recent call last):
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\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 72: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "C:\Users\hyunm\Anaconda3\envs\tensorflow\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 72: invalid continuation byte
'''''
이런 에러가 나면서 제대로 설치가 안됐다.
굵게 표시한 곳을 읽어보면 알겠지만 utf-8문제다...
"Lib/site-package/pip/compat/__init__.py" 이 파일에서
return s.decode('utf_8')를 return s.decode('cp936')로 변경하니까 설치가 잘 된다.
이후에 다시 utf-8로 바꿨는데도 실행에는 문제가 없다.
'코딩 > Python' 카테고리의 다른 글
scapy, RAW socket (0) | 2018.08.24 |
---|---|
ANGR 오류수정 (0) | 2017.07.04 |
Z3 Solver (0) | 2017.06.02 |