[Tutor] Python 2.4.1 on Mndrk Linux 10.1 - path

Nick Lunt nick at javacat.f2s.com
Fri Oct 14 21:12:33 CEST 2005

Hi Andy,

> Behalf Of Andy Dani
> Python 2.3.2 came with the linux distribution which is located in
> /usr/lib.
> Installed 2.4.1 in /usr/local/Python-2.4.1
> updated /etc/profile path so IDLE or "python" would point to the
> latest version (2.4.1).
>     PATH="$PATH:/usr/local/Python-2.4.1/:."
>     export PATH
> But it is still pointing to the old one unless I go
> /use/local/Python-2.4.1/python.
> I want to be able to launch and run python 2.4.1, from the user
> account so I do not need to be "root" every time.

The default install of python on Mandrake probably install the python
executable in /usr/bin/python.
/usr/bin/ is in your PATH, so if you put PATH=$PATH:/usr/local/Python-2.4.1
in /etc/profile it will still pick up the default python install.

Try typing 'which python' at the command line and see what it picks up.
Chances are it will be /usr/bin/python.

You could solve this by either putting
PATH=/path/to/my/wanted/python/dir:$PATH in /etc/profile (or
~/.bash_profile) or by putting an alias in ~/.bashrc, such as 'alias

What I must stress is that you do not overwrite your default python
installation, leave it as it is, otherwise many of mandrakes GUI tools will
no work.

I hope that helps, feel free to ask more questions about this as I have had
to overcome the same issue on RHEL serveral times.

Nick .

More information about the Tutor mailing list