danielmcgrath / sublime-pyflakes

Sublime Text 2 Pyflakes package
13 stars 5 forks source link

OSError #1

Open xapple opened 12 years ago

xapple commented 12 years ago

I followed the installation procedure by placing pyflakes.py in the Sublime Text 2/Packages/User directory and restarting Sublime Text 2. However every time I save a python file I get the following traceback in the console:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 190, in on_post_save
  File "./sublime_plugin.py", line 154, in run_timed_function
  File "./sublime_plugin.py", line 189, in <lambda>
  File "./pyflakes.py", line 40, in on_post_save
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I am running OS X 10.7.4

danielmcgrath commented 12 years ago

Do you have pyflakes installed? If you open a terminal and run which pyflakes you should see something like /usr/bin/pyflakes/.

You can install pyflakes through pip or easy_install. Let me know if that fixes it!

xapple commented 12 years ago

Yes I have pyflkes installed

$ which pyflakes
/usr/local/bin/pyflakes

I found that someone has made a fix: https://github.com/cancerhermit/sublime-pyflakes/commit/140838d5d9567700cbc3a9da2c371cd40d173e5f#L2R39

danielmcgrath commented 12 years ago

Ah, I see. As far as I know, this is an issue with how PATH works for Sublime. If you move pyflakes to /usr/bin/ it will definitely work, and I can look into finding a work-around for the bug.