Could not find platform dependent libraries exec_prefix

Could not find platform dependent libraries <exec_prefix>  

Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

BUG描述:

在Ubuntu上安装Python时,出现如下报错,:

Makefile:1092: recipe for target 'libinstall' failed

make: *** [libinstall] Error 1

在终端输入python后,打开的python解释器中前两行提示:
Could not find platform dependent libraries <exec_prefix>  

Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

解决方法:

1.在安装的./configure检查环境配置时,先创建好安装的目录如:/usr/local/python2.7/

2.configure时指定前缀,如: ./confirgure --prefix=/usr/local/python2.7/

后面再执行make & make install时就正常了

 

Could not find platform dependent libraries exec_prefix