设置Linux使用某个版本的python进行编译 [英] Setting up Linux to use a certain version of python for compile
问题描述
我运行Ubuntu编译一组代码,需要python 2.4。
I'm running Ubuntu to compile a set of code which requires python 2.4.
如何设置一个终端启动器,以便当我打开所有python
How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu?
推荐答案
设置相关命令将使用python 2.4而不是Ubuntu中默认的python 2.6。 bash
在该会话中的别名: alias python = python2.4
(假设python2.4在你的$ PATH当然)。这样,你不必记住在该终端中显式地键入 2.4
一百万次 - 这是什么bash别名! - )
Set a bash
alias in that shell session: alias python=python2.4
(assuming python2.4 is in your $PATH of course). This way you won't have to remember to explicitly type the 2.4
a zillion times in that terminal -- which is what bash aliases are for!-)
这篇关于设置Linux使用某个版本的python进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!