![Windows에서 Python에 scrapy를 설치할 때 OpenSSL 문제](https://rvso.com/image/1395281/Windows%EC%97%90%EC%84%9C%20Python%EC%97%90%20scrapy%EB%A5%BC%20%EC%84%A4%EC%B9%98%ED%95%A0%20%EB%95%8C%20OpenSSL%20%EB%AC%B8%EC%A0%9C.png)
Python Scrapy
(스크래피가 작동하도록 64비트 설치 프로그램을 설치하지 못한 후) 32비트 설치 프로그램으로 전환했습니다 . 언급된 단계를 따랐습니다.여기.
easy_install
이것은 on을 실행할 때의 로그입니다 scrapy
.
Searching for scrapy
Best match: scrapy 0.22.0
Processing scrapy-0.22.0-py2.7.egg
scrapy 0.22.0 is already the active version in easy-install.pth
Installing scrapy script to C:\Python27\Scripts
Installing scrapy.bat script to C:\Python27\Scripts
Using c:\python27\lib\site-packages\scrapy-0.22.0-py2.7.egg
Processing dependencies for scrapy
Searching for cryptography>=0.1
Reading http://pypi.python.org/simple/cryptography/
Best match: cryptography 0.1
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-
0.1.tar.gz#md5=bdc1c5fe069deca7467b71a0cc538f17
Processing cryptography-0.1.tar.gz
Running cryptography-0.1\setup.py -q bdist_egg --dist-dir c:\users\faizan\appdat
a\local\temp\easy_install-myikuq\cryptography-0.1\egg-dist-tmp-vfydke
Searching for cffi>=0.6
Reading http://pypi.python.org/simple/cffi/
Best match: cffi 0.8.1
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-0.8.1.tar.gz#md5
=1a877bf113bfe90fdefedbf9e39310d2
Processing cffi-0.8.1.tar.gz
Running cffi-0.8.1\setup.py -q bdist_egg --dist-dir c:\users\faizan\appdata\loca
l\temp\easy_install-myikuq\cryptography-0.1\temp\easy_install-zoguzs\cffi-0.8.1\
egg-dist-tmp-trop2u
_cffi_backend.c
c/_cffi_backend.c(5261) : warning C4146: unary minus operator applied to unsigne
d type, result still unsigned
c/_cffi_backend.c(5262) : warning C4146: unary minus operator applied to unsigne
d type, result still unsigned
c/_cffi_backend.c(5263) : warning C4146: unary minus operator applied to unsigne
d type, result still unsigned
c/_cffi_backend.c(5264) : warning C4146: unary minus operator applied to unsigne
d type, result still unsigned
ffi.c
c/libffi_msvc\ffi.c(122) : warning C4018: '>' : signed/unsigned mismatch
prep_cif.c
types.c
win32.c
Creating library build\temp.win32-2.7\Release\c\_cffi_backend.lib and object
build\temp.win32-2.7\Release\c\_cffi_backend.exp
Installed c:\users\faizan\appdata\local\temp\easy_install-myikuq\cryptography-0.
1\cffi-0.8.1-py2.7-win32.egg
Searching for pycparser
Reading http://pypi.python.org/simple/pycparser/
Best match: pycparser 2.10
Downloading https://pypi.python.org/packages/source/p/pycparser/pycparser-2.10.t
ar.gz#md5=d87aed98c8a9f386aa56d365fe4d515f
Processing pycparser-2.10.tar.gz
Running pycparser-2.10\setup.py -q bdist_egg --dist-dir c:\users\faizan\appdata\
local\temp\easy_install-myikuq\cryptography-0.1\temp\easy_install-ngu9w1\pycpars
er-2.10\egg-dist-tmp-2uhfme
zip_safe flag not set; analyzing archive contents...
Installed c:\users\faizan\appdata\local\temp\easy_install-myikuq\cryptography-0.
1\pycparser-2.10-py2.7.egg
_cffi__xcfd0a060xfba2f231.c
Creating library c:\users\faizan\appdata\local\temp\easy_install-myikuq\crypt
ography-0.1\cryptography\hazmat\primitives\__pycache__\Release\cryptography\hazm
at\primitives\__pycache__\_cffi__xcfd0a060xfba2f231.lib and object c:\users\faiz
an\appdata\local\temp\easy_install-myikuq\cryptography-0.1\cryptography\hazmat\p
rimitives\__pycache__\Release\cryptography\hazmat\primitives\__pycache__\_cffi__
xcfd0a060xfba2f231.exp
_cffi__x5fea2bacx4a8b9ec1.c
cryptography\hazmat\primitives\__pycache__\_cffi__x5fea2bacx4a8b9ec1.c(218) : wa
rning C4244: '=' : conversion from 'unsigned __int64' to 'uint8_t', possible los
s of data
Creating library c:\users\faizan\appdata\local\temp\easy_install-myikuq\crypt
ography-0.1\cryptography\hazmat\primitives\__pycache__\Release\cryptography\hazm
at\primitives\__pycache__\_cffi__x5fea2bacx4a8b9ec1.lib and object c:\users\faiz
an\appdata\local\temp\easy_install-myikuq\cryptography-0.1\cryptography\hazmat\p
rimitives\__pycache__\Release\cryptography\hazmat\primitives\__pycache__\_cffi__
x5fea2bacx4a8b9ec1.exp
_cffi__xd9dc3d0ax8cb54b0a.c
cryptography\hazmat\bindings\__pycache__\_cffi__xd9dc3d0ax8cb54b0a.c(165) : fata
l error C1083: Cannot open include file: 'openssl/asn1.h': No such file or direc
tory
error: c:\users\faizan\appdata\local\temp\easy_install-myikuq\cryptography-0.1\c
ffi-0.8.1-py2.7-win32.egg\_cffi_backend.pyd: Access is denied
나는 그 문제에 대한 모든 게시물 답변이나 튜토리얼을 시도했습니다. 이 문제를 극복할 수 있는 솔루션이 있습니까? 나는 64비트 Windows 컴퓨터를 사용하고 있습니다.
답변1
나는 똑같은 문제가 있지만 Windows XP에서 발생합니다.
openssl/asn1.h와 같은 파일 문제를 해결하려면 LIB
및 INCLUDE
시스템 변수를 확인하세요.
Windows XP에서는 다음 명령을 사용하여 CMD 프롬프트 창에서 이 작업을 수행할 수 있습니다.
SET LIB
SET INCLUDE
여기에는 OpenSSL 디렉터리의 lib 및 include 폴더가 포함되어야 합니다. 내 컴퓨터에서:
SET LIB C:\OpenSSL-win32\lib;etc;etc;etc
SET INCLUDE C:\OpenSSL-win32\include;etc;etc
다음과 같이 시스템 변수에 추가할 수 있습니다.
SET LIB=C:\OPenSSL-win32\lib;%LIB%
이 방법으로는 액세스 거부 문제가 해결되지 않습니다.
답변2
나중에 누군가가 이 스레드를 보게 된다면:
Python 2.7에서 easy_install을 사용하여 Scrapy를 설치하는 데 엄청난 어려움을 겪었습니다. 특히 암호화 모듈은 설치가 불가능했다.
나는 다음에서 찾은 정보를 사용하여 pip를 설치했습니다.https://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
그 후 간단 pip install scrapy
하게 사업을 시작했습니다.