py-autopep8.el icon indicating copy to clipboard operation
py-autopep8.el copied to clipboard

autopep8 command not found

Open snowleung opened this issue 9 years ago • 8 comments

It's work well at emacs24.4 (GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0)) but when I use Emacs of Mac OS X(This is GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21),with GUI, display "autopep8 command not found" on the mini buffer. also, I use this M-x py-autopep8-buffer to call the function. thanks.

snowleung avatar Jul 30 '15 06:07 snowleung

Could you try this:

M-x shell-command RET
autopep8 RET

What happens when you do this?

paetzke avatar Aug 16 '15 14:08 paetzke

7ac2f992-d1ab-4221-a1ba-c214029c221f

snowleung avatar Aug 19 '15 08:08 snowleung

Same exact thing here. Works totally fine in my terminal. But this emacs plugin does not work.

flexgrip avatar Oct 09 '15 17:10 flexgrip

Same here +1

mcobzarenco avatar Dec 26 '15 23:12 mcobzarenco

Right, the problem in my case was that the PATH variable was set differently in Emacs compared to the shell. @flexgrip @snowleung try:

M-x shell-command RET
echo $PATH RET

and compare it with echo $PATH in your shell.

mcobzarenco avatar Dec 26 '15 23:12 mcobzarenco

@mcobzarenco hey, you are right, they're different. in terminal, it seems include some ... ruby library?

snowleung avatar Dec 27 '15 14:12 snowleung

try exec-path-from-shell.

this issue can be closed as it's not a bug in this package.

wbolster avatar Feb 01 '18 19:02 wbolster

Melpa now points to a fork of this package maintained here: https://github.com/ideasman42/emacs-py-autopep8

This adds py-autopep8-command (defaulting to autopep8). So you can point to the location of autopep8 without it being in your path.

ideasman42 avatar May 03 '22 23:05 ideasman42