anahita
anahita

Reputation: 55

most of terminal commands do not work

I am new to python and OSX terminal commands. I wanted to permanently add a directory to PYTHONPATH, thus I looked here and used these instructions:

1-Open up Terminal

2-Type open .bash_profile

3-In the text file that pops up, add this line at the end: export PYTHONPATH=$PYTHONPATH:foo/bar

4-Save the file, restart the Terminal, and you're done

I also followed this instruction:

export PYTHONPATH="${PYTHONPATH}:/my/other/path"

After these changes I cannot use any command like python, which, whereis, pip, etc. in Terminal :(

The response is something like below:

-bash: which: command not found

I do not know what I have done.

Upvotes: 1

Views: 238

Answers (1)

devendermahto
devendermahto

Reputation: 141

are you sure you have appended the path because what i can see is you have replaced old path definition and assigned a new one

remove bash profile use one of these commands /bin/rm ~/.bash_profile Or if you want to save your current bash configs then use a mv instead /bin/mv ~/.bash_profile ~/bash_profile Then close your terminal and start again you will be able to use all commands and apps

Upvotes: -1

Related Questions