paetzke / py-autopep8.el

py-autopep8.el integrates autopep8 into Emacs.
GNU General Public License v3.0
79 stars 21 forks source link

Error: (error "autopep8 command not found.") on Windows #16

Open xuehao opened 8 years ago

xuehao commented 8 years ago

In the CMD, I can call autopep8. But in the emacs it can't be called by this tool.

EskoJTH commented 6 years ago

I believe the problem is that the file is located at C:\Users...\AppData\Roaming\Python\Python36\Scripts\autopep8.exe and apparently py-autopep8 doesn't look there.

EskoJTH commented 6 years ago

now that I added autopep8 to the path the error I get is "Searching for program: No such file or directory, diff" ...? Apparently this is a command line tool that doesn't exist for windows.

wbolster commented 6 years ago

the answer is to fix your path, e.g. by setting exec-path inside emacs.

this issues can be closed since it's not a problem with this package, it seems.

ideasman42 commented 2 years ago

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). You can configure this to any command though. I don't use windows but I assume setting it to the Python binary and the first argument of py-autopep8-options to autopep8.py would work as expected. If this is possible to setup automatically for windows, that would be worth looking into.