When I installed scrapy using pip normally, I got the following error and it did not go well, so I will summarize the countermeasures
cffi.ffiplatform.VerificationError: importing '/PATH/.virtualenvs/hoge/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_f3e4673fx399b1113.so': dlopen(/PATH/.virtualenvs/hoge/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_f3e4673fx399b1113.so, 2): Symbol not found: _CRYPTO_malloc_debug_init
Referenced from: /PATH/.virtualenvs/hoge/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_f3e4673fx399b1113.so
Expected in: flat namespace
in /PATH/.virtualenvs/hoge/lib/python2.7/site-packages/cryptography/_Cryptography_cffi_f3e4673fx399b1113.so
Since I installed openssl via macports, it seems that the cause is that the link of openssl cannot be done well with cryptography.
Specifies to use macports lib when installing libraries with pip.
#Put scrapy normally
pip install scrapy
#Erase cryptography once
pip uninstall cryptography
#Specify to use macports lib etc. and re-enter
ARCHFLAGS="-arch x86_64" LDFLAGS="-L/opt/local/lib" CFLAGS="-I/opt/local/include" pip install cryptography
Recommended Posts