Unable to install 32-bit Python with pyenv, despite appropriate flags set

僤鯓⒐⒋嵵緔 提交于 2019-12-20 07:35:13

问题


I'm looking to install the 2.6.6 Python as 32-bit with pyenv on OS X, but get:

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Despite having consulted Common Build Problems, and applying the flags suggested there, as well as installing Xcode developer tools, the problem persists. Here is the full command:

CFLAGS="-I$(xcrun --show-sdk-path)/usr/include -arch i386 -I$(brew --prefix openssl)/include" LDFLAGS="-arch i386 -L$(brew --prefix openssl)/lib" CONFIGURE_OPTS="--with-arch=i386" pyenv install 2.6.6

... but this builds the 64-bit build, which is not what I need.

Oddly, the build works when just the following is tried:

CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install 2.6.6

What are we missing? Does the following from the log imply that I need an openssl which was built for i386 / 32-bit?

ld: warning: ignoring file /usr/local/opt/openssl/lib/libcrypto.dylib, file   
was built for x86_64 which is not the architecture being linked (i386):   
/usr/local/opt/openssl/lib/libcrypto.dylibld: warning: 
ignoring file /usr/local/opt/openssl/lib/libssl.dylib, file was built for 
x86_64 which is not the architecture being linked (i386): 
/usr/local/opt/openssl/lib/libssl.dylib

来源:https://stackoverflow.com/questions/34832512/unable-to-install-32-bit-python-with-pyenv-despite-appropriate-flags-set

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!