{"id":834,"hash":"6bd5d5ea7caae47ffb7e6a8705093e98e04d06ac7d074317b9df44e2724c927c","pattern":"pip installs packages successfully, but executables are not found from the command line","full_message":"I installed Python 2.7 and pip following these instructions, on Mac OS X v10.10.3 (Yosemite).\n\nI 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.\n\nFor example, I tried to install a package called \"rosdep\" as instructed here. I can run sudo pip install -U rosdep\nwhich installs without errors and the corresponding files are located in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages. However, sudo rosdep init subsequently reports that the rosdep command is not found.\n\nI even tried adding the above site-packages path to my $PATH, but the executables are still not found on the command line, even though the packages work perfectly from within python.\n\nWhy does this happen, and how can I fix it?\n\nSee also: Unable to import a module that is definitely installed - these two problems often have the same root cause.","ecosystem":"pypi","package_name":"macos","package_version":null,"solution":"Check your $PATH environment variable.\n\ntox has a command line mode:\n\n$ pip list | grep tox\ntox (2.3.1)\n\nWhere is it?\n\n(The 2.7 stuff doesn't matter much here, sub in any 3.x and pip's behaving pretty much the same way)\n\n$ which tox\n/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/tox\n\nAnd what's in my $PATH?\n\n$ echo $PATH\n/opt/chefdk/bin:/opt/chefdk/embedded/bin:/opt/local/bin:..../opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin...\n\nNotice the /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin?  That's what allows finding my pip-installed stuff\n\nNow, to see where things are from Python, try doing this (substitute rosdep for tox).\n\n$python\n>>> import tox\n>>> tox.__file__\n\nthat prints out:\n\n'/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tox/__init__.pyc'\n\nNow, 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.\n\n$ cd /opt/local/Library/Frameworks/Python.framework/Versions/2.7\n$ ls -1\n\nOutput:\n\nHeaders\nPython\nResources\nbin\ninclude\nlib\nman\nshare","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/35898734/pip-installs-packages-successfully-but-executables-are-not-found-from-the-comma","votes":329,"created_at":"2026-04-19T04:51:47.826353+00:00","updated_at":"2026-04-19T04:51:47.826353+00:00"}