在MacOS上python 2.7.8的pyenv安装失败

时间:2020-07-19 22:29:45

标签: python macos pyenv

我尝试为使用此python版本的项目安装python 2.7.8。

但是当我使用命令时:

$ pyenv install 2.7.8 

我收到此错误消息:

python-build: use openssl from homebrew 
python-build: use readline from homebrew 
Downloading Python-2.7.8.tar.xz...
-> https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz 
Installing Python-2.7.8... 
patching file ./Lib/site.py 
patching file ./Lib/ssl.py 
patching file ./Modules/_ssl.c 
python-build: use readline from homebrew ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
        
Please consult to the Wiki page to fix the problem. 
https://github.com/pyenv/pyenv/wiki/Common-build-problems
        
BUILD FAILED (OS X 10.13.6 using python-build 20180424)
        
Inspect or clean up the working tree at /var/folders/xj/fd4h39yj5tn126v2rpf729km0000gn/T/python-build.20200719233445.90241 Results logged to /var/folders/xj/fd4h39yj5tn126v2rpf729km0000gn/T/python-build.20200719233445.90241.log
        
Last 10 log lines: 
(cd /Users/nekcorp/.pyenv/versions/2.7.8/bin; ln -s python2-config python-config) 
test -d /Users/nekcorp/.pyenv/versions/2.7.8/lib/pkgconfig || /usr/bin/install -c -d -m 755 /Users/nekcorp/.pyenv/versions/2.7.8/lib/pkgconfig
rm -f /Users/nekcorp/.pyenv/versions/2.7.8/lib/pkgconfig/python2.pc 
(cd /Users/nekcorp/.pyenv/versions/2.7.8/lib/pkgconfig; ln -s python-2.7.pc python2.pc) 
rm -f /Users/nekcorp/.pyenv/versions/2.7.8/lib/pkgconfig/python.pc 
(cd /Users/nekcorp/.pyenv/versions/2.7.8/lib/pkgconfig; ln -s python2.pc python.pc) 
rm -f /Users/nekcorp/.pyenv/versions/2.7.8/share/man/man1/python2.1 
(cd /Users/nekcorp/.pyenv/versions/2.7.8/share/man/man1; ln -s python2.7.1 python2.1) 
rm -f /Users/nekcorp/.pyenv/versions/2.7.8/share/man/man1/python.1 
(cd /Users/nekcorp/.pyenv/versions/2.7.8/share/man/man1; ln -s python2.1 python.1)

我已经看到了说明中的链接,并且导出了CFLAGS和CPPFLAGS环境变量,但是我仍然收到错误消息。

感谢您的帮助。

0 个答案:

没有答案