Issues debugging Python on OS X

I’m not sure if this an issue with Python only or it happens with all supported languages, anyway, here’s the problem I have:

I have installed in Mavericks the brew version of python, so I have 2 python versions, the one that comes with Mavericks and the one installed by myself (that one is installed under /usr/local). I did this because I don’t want to mess with OS X’s version of python, I use my own version to develop.

I have installed a third party module (boto) on my custom python, I’ve also modified my PATH environment variable to look first in /usr/local/bin, so my version is python is used, if I run the script I wrote from the command line it works perfectly, but when I’m trying to debug it using Komodo, I got an error:

ImportError: No module named boto.ec2.autoscale

so I guess Komodo is not honoring my PATH settings and is using the default Python version, I’ve tried to override the PATH variable in the ‘Environment’ tab in the ‘Debugging Options’ dialog box, but I still got the error.

How can I fix this?

Go to Edit - Preferences.
Find Language - Python or Language - Python3.
Choose the interpreter and add custom catalog with boto. (Additional Python(3) Import Directories).

1 Like

That worked perfectly! So it was not a bug but my lack of experience with Komodo, sorry about that :smile:

Thank you Defman21 for your help!

1 Like

You are welcome, Toshiro!

Sounds like Komodo is using a different Python interpreter (possibly the system /usr/bin/python instead of your own Python at /usr/local/bin/python). Check the preferences and point Komodo to use the correct Python interpreter.

Adding boto to the Additional Python Directories should not be necessary if it already works on the command line - as Komodo should work the same way as the command line does (i.e. it will execute the same Python interpreter).