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

Solution 1:

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.

Solution 2:

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.