python2.7.5
2021-05-02 22:27
标签:name not function sys sha pyc util 导入 site 解决: 查看Python路径相关环境变量的意义。 这里是导入 site 模块时出错,所以应该在 PYTHONPATH 上增加 site 模块的路径。 查找site相关文件的路径: 增加路径到环境变量: python2.7.5 标签:name not function sys sha pyc util 导入 site 原文地址:https://www.cnblogs.com/dream397/p/13202185.html ./configure --prefix=/usr/local/python2.7.5
gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython2.7.a -lpthread -ldl -lutil -lm
libpython2.7.a(posixmodule.o): In function `posix_tmpnam‘:
/root/Python-2.7.5/./Modules/posixmodule.c:7515: warning: the use of `tmpnam_r‘ is dangerous, better use `mkstemp‘
libpython2.7.a(posixmodule.o): In function `posix_tempnam‘:
/root/Python-2.7.5/./Modules/posixmodule.c:7462: warning: the use of `tempnam‘ is dangerous, better use `mkstemp‘
./python -E -S -m sysconfig --generate-posix-vars
Could not find platform dependent libraries
[root@tZ etc]# find / -name site.py*
/usr/lib64/python2.7/site.pyc
/usr/lib64/python2.7/site.py
/usr/lib64/python2.7/site.pyo
[root@host-10-10-18-131 Python-2.7.5]# export PYTHONPATH=$PYTHONPATH:/usr/local/python2.7.5
[root@host-10-10-18-131 Python-2.7.5]# make -j 4
./python -E -S -m sysconfig --generate-posix-vars
Could not find platform dependent libraries