"sudo: port: command not found" after installing MacPorts on Snow leopard

It is probably a PATH issue.

By default port is installed the directory /opt/local/bin. Add the path 'opt/local/bin' as an extra line to the plain text file /etc/paths and you should be good.


You can also add the following line to your ~/.bash_profile:

export PATH=$PATH:/opt/local/bin

This will add /opt/local/bin to the executable path and make your port command available to the shell.


open a terminal, then write:

sudo nano /etc/paths

write your password

then copy and paste in to the bottom:

/opt/local/bin

save the file:

alt + x and then y

Restart the computer.