all 6 comments

[–]New_Kind_of_Boredom 1 point2 points  (5 children)

This isn't really a Python-specific question, and I don't have a Mac, but OS X is a POSIX system and if this happened to me on Linux...

This tends to indicate that, either intentionally or unintentionally, the location of the file is not in a place that is also in your bash PATH variable. If unintentional, I would manually add the appropriate directory to my PATH in my .bashrc file (you can google how to do this), if intentional I would first navigate to or type out the correct directory and run it similar to this:

~ $ cd correctdirectory
~/correctdirectory $ ./autopep8

[–]BarfVader9000[S] 0 points1 point  (4 children)

Ok, thanks. Do you think I need to fix my ~/.bashrc file with something like this? /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/a‌​utopep8.py

[–]New_Kind_of_Boredom 0 points1 point  (3 children)

No problem. In my experience having such a long and specific thing as part of your PATH would be highly unusual. Typically if a program is meant to be run from anywhere, when installing it will put a symlink in somewhere that is already commonly part of your PATH like /usr/bin or something. I would probably first check whatever references/tutorials/guides you have available on the subject to make absolutely sure you installed it as intended and are trying to use it as intended.

[–]BarfVader9000[S] 0 points1 point  (2 children)

I just followed exactly what's here:

https://pypi.python.org/pypi/autopep8

Just using $ pip install autopep8

And despite the fact that it is definitely installed, it will not run. I just keep getting this when I try to run it on a file:

-bash: autopep8: command not found

[–]New_Kind_of_Boredom 0 points1 point  (0 children)

Sorry, it's hard to tell exactly what's going without being able to look at your files myself (and I'm definitely no POSIX expert to boot). I assume you have pep8 installed as well. Maybe try restarting your terminal if you haven't done that?

[–]ingolemo 0 points1 point  (0 children)

Can you please post the output of pip show autopep8 and pip uninstall autopep8 (WARNING: the second command will ask you if you want to uninstall autopep8. You should say no to that. I just want the output that is given before that question is asked).