被修改 我试图在我的操作系统上安装Python 2.7。 我用了这个评论:
yum install -y python27
这是输出:
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.hosteurope.de
* epel: repo.fedoralinux.ir
* extras: ftp.hosteurope.de
* updates: ftp.hosteurope.de
Package python27-1.1-25.el6.x86_64 already installed and latest version
Nothing to do
所以它似乎已经完成了。但我仍然看到以前的2.6版本。我应该在.bashrc
文件中添加哪个地址到路径
它在:
/opt/rh/python27/root/lib/modules
/opt/rh/python27/root/usr/include/python2.7/moduleobject.h
/opt/rh/python27/root/usr/include/python2.7/sysmodule.h
/opt/rh/python27/root/usr/lib/python2.7/site-packages/nose/plugins/allmodules.py
/opt/rh/python27/root/usr/lib/python2.7/site-packages/nose/plugins/allmodules.pyc
/opt/rh/python27/root/usr/lib/python2.7/site-packages/nose/plugins/allmodules.pyo
/opt/rh/python27/root/usr/lib/python2.7/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst
/opt/rh/python27/root/usr/lib64/pm-utils/module.d
/opt/rh/python27/root/usr/lib64/python2.7/modulefinder.py
/opt/rh/python27/root/usr/lib64/python2.7/modulefinder.pyc
/opt/rh/python27/root/usr/lib64/python2.7/modulefinder.pyo
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_bisectmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_collectionsmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_cryptmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_functoolsmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_localemodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_multibytecodecmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_randommodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_socketmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/arraymodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/cmathmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/dlmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/fcntlmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/gdbmmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/grpmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/itertoolsmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/mmapmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/nismodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/parsermodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/selectmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/spwdmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/stropmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/timemodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/timingmodule.so
/opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/zlibmodule.so
感谢任何评论或指导。
答案 0 :(得分:1)
尝试此命令:
. /opt/rh/python27/enable
然后询问python版本:
python -V
输出:
Python 2.7.8
现在要小心,只要你保持会话就行了。 I.E. :一旦退出shell,环境变量就会消失。
答案 1 :(得分:0)
通常有关编译的更多信息,源目录中有一个文件,如" config.log"注册在编译和错误期间运行的所有命令
不允许您完成make命令的命令位于此日志文件中
您可以看到错误和命令,这些错误和命令会在此处显示错误并进行搜索