pip installs packages successfully, but executables not found from command line

I am working on mac OS X Yosemite, version 10.10.3.

I installed python2.7 and pip using macport as done in http://johnlaudun.org/20150512-installing-and-setting-pip-with-macports/

I can successfully install packages and import them inside my python environment and python scripts. However any executable associated with a package that can be called from the command line in the terminal are not found.

Does anyone know what might be wrong? (More details below)

For example while installing a package called "rosdep" as instructed in http://wiki.ros.org/jade/Installation/Source

I can run: sudo pip install -U rosdep which installs without errors and corresponding files are located in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

However if I try to run : sudo rosdep init, it gives an error : "sudo: rosdep: command not found"

This is not a package specific error. I get this for any package installed using pip on my computer. I even tried adding


to my $PATH. But the executables are not found on the command line, even though the packages work perfectly from within python.

check your $PATH

tox has a command line mode:

    audrey:tests jluc$ pip list | grep tox
    tox (2.3.1)

where is it?

    audrey:tests jluc$ which tox

and what's in my $PATH?

    audrey:tests jluc$ echo $PATH

Notice the /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin? That's what allows finding my pip-installed stuff

Now, to see where things are from Python, try doing this (substitute rosdep for tox).

    >>> import tox
    >>> tox.__file__

that prints out:


Now, cd to the directory right above lib in the above. Do you see a bin directory? Do you see rosdep in that bin? If so try adding the bin to your $PATH.

    audrey:2.7 jluc$ cd /opt/local/Library/Frameworks/Python.framework/Versions/2.7
    audrey:2.7 jluc$ ls -1



From: stackoverflow.com/q/35898734

Back to homepage or read more recommendations: