Python/Python__Error

ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

말하는감자 2021. 4. 4. 14:54

 

  • 환경 : windows 10

 


 

  • 오류 메세지
 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\shb22\appdata\local\programs\python\python39\include -Ic:\users\shb22\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.
28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tc
build\temp.win-amd64-3.9\Release\_openssl.c /Fobuild\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release\_openssl.obj
  _openssl.c
  build\temp.win-amd64-3.9\Release\_openssl.c(575): fatal error C1083: 포함 파일을 열 수 없습니다. 'openssl/opensslv.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

 

 


 

  • 첫번째로 시도할 만한 것
pip install git+https://github.com/n8henrie/pycookiecheat@dev

 


 

  • 두번째로 시도할 만한 것

 

1. url 에서 자신의 os에 맞는 파일을 다운 받는다

2. 다운 받은 파일을 설치한다. 이때 기본 경로는 이것과 비슷할 것이다. (C:\Program Files\OpenSSL-Win64)

3. pycharm 이나 터미널에서 아래와 같이 순서대로 입력한다

set INCLUDE=C:\Program Files\OpenSSL-Win64\include;%INCLUDE%
set LIB=C:\Program Files\OpenSSL-Win64\lib;%LIB%
pip install cryptography
pip install pycookiechat