Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

pip install pefile - 'cp949' codec can't decode byte 0xe2 in position 208687: illegal multibyte sequence

pip로 pefile 패키지를 설치하려는데 다음과 같은 오류가 발생합니다.

C:\Program Files\Python36>pip install pefile
Collecting pefile
  Using cached pefile-2016.3.28.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "%LOCALAPPDATA%\Temp\pip-build-xi8ohnrs\pefile\setup.py", line 57, in <module>
        pefile_version = _read_attr('__version__')
      File "%LOCALAPPDATA%\Temp\pip-build-xi8ohnrs\pefile\setup.py", line 39, in _read_attr
        match = re.search(regex, f.read())
    UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 208687: illegal multibyte sequence

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in %LOCALAPPDATA%\Temp\pip-build-xi8ohnrs\pefile\

검색해 보니, 해당 파일에 대해 unicode 문제를 해결한 버전을 배포하고 있으니 이것을 직접 설치하라고 합니다.

https://github.com/erocarrera/pefile/archive/master.zip

재미있는 것은, 역시 pip install로 하면 설치가 안됩니다.

C:\Program Files\Python36>pip install https://github.com/erocarrera/pefile/archive/master.zip
Collecting https://github.com/erocarrera/pefile/archive/master.zip
  Downloading https://github.com/erocarrera/pefile/archive/master.zip
     - 57.7MB 11.4MB/s
Collecting future (from pefile==2017.5.26)
  Using cached future-0.16.0.tar.gz
Installing collected packages: future, pefile
  Running setup.py install for future ... error
    Complete output from command "c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='%LOCALAPPDATA%\\Temp\\pip-build-lwtz_b1q\\future\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record %LOCALAPPDATA%\Temp\pip-k9s62pap-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
...[생략]...
    copying src\libpasteurize\fixes\__init__.py -> build\lib\libpasteurize\fixes
    running egg_info
    writing src\future.egg-info\PKG-INFO
    writing dependency_links to src\future.egg-info\dependency_links.txt
    writing entry points to src\future.egg-info\entry_points.txt
    writing top-level names to src\future.egg-info\top_level.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'src\future.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.au' under directory 'tests'
    warning: no files found matching '*.gif' under directory 'tests'
    warning: no files found matching '*.txt' under directory 'tests'
    writing manifest file 'src\future.egg-info\SOURCES.txt'
    copying src\future\backports\test\badcert.pem -> build\lib\future\backports\test
...[생략]...
    copying src\future\backports\test\ssl_key.pem -> build\lib\future\backports\test
    creating build\lib\past\tests
    copying src\past\tests\__init__.py -> build\lib\past\tests
    running install_lib
    creating c:\program files\python36\Lib\site-packages\future
    error: could not create 'c:\program files\python36\Lib\site-packages\future': Access is denied

    ----------------------------------------
Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='%LOCALAPPDATA%\\Temp\\pip-build-lwtz_b1q\\future\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record %LOCALAPPDATA%\Temp\pip-k9s62pap-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in %LOCALAPPDATA%\Temp\pip-build-lwtz_b1q\future\

반면, "python.exe -m" 옵션으로 설치하니 정상적으로 동작합니다.

c:\Program Files\Python36>python.exe -m pip install https://github.com/erocarrera/pefile/archive/master.zip
Collecting https://github.com/erocarrera/pefile/archive/master.zip
  Downloading https://github.com/erocarrera/pefile/archive/master.zip (56.3MB)
    100% |................................| 56.3MB 23kB/s
Collecting future (from pefile==2017.5.26)
  Using cached future-0.16.0.tar.gz
Installing collected packages: future, pefile
  Running setup.py install for future ... done
  Running setup.py install for pefile ... done
Successfully installed future-0.16.0 pefile-2017.5.26




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 7/13/2017]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 121  122  123  124  125  126  127  [128]  129  130  131  132  133  134  135  ...
NoWriterDateCnt.TitleFile(s)
1855정성태2/10/201520681개발 환경 구성: 256. WebDAV Redirector - Sysinternals 폴더 연결 시 "The network path was not found" 오류 해결 방법
1854정성태2/10/201521678Windows: 104. 폴더는 삭제할 수 없지만, 그 하위 폴더/파일은 생성/삭제/변경하는 보안 설정
1853정성태2/6/201551954웹: 29. 여신금융협회 웹 사이트의 "Netscape 6.0은 지원하지 않습니다." 오류 메시지 [5]
1852정성태2/5/201522354.NET Framework: 492. .NET CLR Memory 성능 카운터의 의미파일 다운로드1
1851정성태2/5/201523316VC++: 88. 하룻밤의 꿈 - 인텔 하스웰의 TSX Instruction 지원 [2]
1850정성태2/4/201544155Windows: 103. 작업 관리자에서의 "Commit size"가 가리키는 메모리의 의미 [4]
1849정성태2/4/201524084기타: 51. DropBox의 CPU 100% 현상 [1]파일 다운로드1
1848정성태2/4/201519316.NET Framework: 491. 닷넷 Generic 타입의 메타 데이터 토큰 값 알아내는 방법 [2]
1847정성태2/3/201522670기타: 50. C# - 윈도우에서 dropbox 동기화 폴더 경로 및 종료하는 방법
1846정성태2/2/201531948Windows: 102. 제어판의 프로그램 추가/삭제 항목을 수동으로 실행하고 싶다면? [1]
1845정성태1/26/201532830Windows: 101. 제어판의 "Windows 자격 증명 관리(Manage your credentials)"를 금지시키는 방법
1844정성태1/26/201530775오류 유형: 269. USB 메모리의 용량이 비정상적으로 보여진다면? [7]
1843정성태1/24/201521785VC++: 87. 무시할 수 없는 Visual C++ 런타임 함수 성능
1842정성태1/23/201544294개발 환경 구성: 255. 노트북 키보드에 없는 BREAK 키를 다른 키로 대체하는 방법
1841정성태1/21/201519237오류 유형: 268. Win32 핸들 관련 CLR4 보안 오류 사례
1840정성태1/8/201527496오류 유형: 267. Visual Studio - CodeLens 사용 시 CPU 100% 현상
1839정성태1/5/201520397디버깅 기술: 69. windbg 분석 사례 - cpu 100% 현상 (2)
1838정성태1/4/201540131기타: 49. 윈도우 내레이터(Narrator) 기능 끄는 방법(윈도우에 파란색의 굵은 테두리 선이 나타난다면?) [4]
1837정성태1/4/201526246디버깅 기술: 68. windbg 분석 사례 - 메모리 부족 [1]
1836정성태1/4/201526254디버깅 기술: 67. windbg - 덤프 파일과 handle 정보
1835정성태1/3/201526751개발 환경 구성: 254. SQL 서버 역시 SSL 3.0/TLS 1.0만을 지원하는 듯!
1834정성태1/3/201551392개발 환경 구성: 253. TLS 1.2를 적용한 IIS 웹 사이트 구성
1833정성태1/3/201527447.NET Framework: 490. System.Data.SqlClient는 SSL 3.0/TLS 1.0만 지원하는 듯! [3]
1832정성태1/2/201520514오류 유형: 266. Azure에 응용 프로그램 게시 중 로그인 오류
1831정성태1/1/201528391디버깅 기술: 66. windbg 분석 사례 - cpu 100% 현상 (1) [1]
1830정성태1/1/201527430오류 유형: 265. svchost.exe 프로세스(IP Helper: IPHLPSVC)의 CPU 100% 현상
... 121  122  123  124  125  126  127  [128]  129  130  131  132  133  134  135  ...