Export: Command not found


I’m trying to add a custom install of python (v2.4.2).

I’m new to *nix and I’m having a few difficulties.

From what I understand I need to change my bash_profile so that it /bin and /lib is in my $HOME.

Opening bash_profile via “vim .bash_profile”
And adding: export PATH=$HOME/bin/python/bin:$HOME/lib/bin:$PATH
So totally the file reads:
Umask 002
export PATH=$HOME/bin/python/bin:$HOME/lib/bin:$PATH

I “:wq” to save and escape. But then when I type: source ~/.bash_profile
I get:
PS1=[\h]: Command not found.
export: Command not found.

I tried adding #!/bin/bash at the top of the file, but it make a difference.


Have you tried source .bash_profile

/usr/bin/python2.4 already exists on the servers I believe.



I’ve tried both source .bash_profile and source ~/.bash_profile
I believe they do the same thing.

I checked the server, and /usr/bin/python2.4 is indeed there. But I’m not sure how to use it or if I need to. I’ve already installed python2.4.2 [1], but I’m not sure how to make it the default. When I type python into the command line, I still get python 2.3.5.

I feel like the bash_profile isn’t getting recognized properly. It seems strange that even PS1=[\h] is generating an error, I didn’t even write that line.

[1] from the wiki http://wiki.dreamhost.com/index.php/Python


Create a new .bash_profile and use pico -w .bash_profile.

Put in:-

~/.bash_profile: executed by bash(1) for login shells.

umask 002
PS1=’[\h]$ ’

Which of course is the default .bash_profile and save it as usual. Note the empty line above and below the two lines.

Check it is chmod 644 and user and group are correct and then try source .bash_profile

What are you trying to install your Python for?
You can use /usr/bin/python2.4 to enter the python command line or /usr/bin/python2.4 -v for version.



I made a new bash_profile, exactly as you specified, and saved it over the old one. I checked to make sure that the permissions are 644. Then I tried source .bash_profile, and got

Umask: Command not found.
PS1=[\h]$ : Command not found.

I would like to use Turbogears, which needs python 2.4.


I just tried this. no dice.

I really feel like the file isn’t getting recognized properly. But I’m not really sure. I’m not very good in the world of *nix.


Maybe you have confused your current settings with your previous work.
Try logging off and then back in with ssh and test the default .bash_profile again.

If you still get errors type :-


at the prompt (and press return) and check your settings that come up.

Check that at least you have.





I knew it had to be really stupid. My shell account was /usr/bin/tcsh, not bin/bash. Problem solved.

Once again, Thank you very much.