操作系统: MacOS 10.14 Beta
目标:通过 PYENV 安装 Python 3.7.0
尝试通过 pyenv 安装 python 3.7.0 时出现此错误,我该如何解决?
Last 10 log lines:
File "/private/tmp/python-build.20180704152803.38921/Python-3.7.0/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/private/tmp/python-build.20180704152803.38921/Python-3.7.0/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/private/tmp/python-build.20180704152803.38921/Python-3.7.0/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/tmp/python-build.20180704152803.38921/Python-3.7.0/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
尝试修复的步骤:
1)重新安装XCODE
2)重新安装 XCODE 命令行工具
3)阅读 Stack Overflow 上的类似错误
替代问题:
1) zlib 应该是预装的,我可能会遇到什么样的问题?
2)将python手动安装到pyenv也可以被pyenv识别的另一种方法是什么?