Note: if you don’t have SublimeREPL installed in Sublime, refer to this post.
Problem: Your favorite Python Modules like PANDAS is not working
If you try to import Pandas in the SublimeREPL, you are going to get an error saying it couldn’t find it, even if you have it install on your system. What the heck is going on!? Well, the SublimeREPL is not using your system version of Python and thus is unable to access the modules you have installed on it.
Now you have the choice of either deleting or commenting out line 22. My line 23 is what you are going to want to add to this file. The path (“/Library/Frameworks/Python.framework/Versions/3.4/bin/python3”) is where my python3 is located on my system.
If you are using Python 2 and don’t know where it is on your machine, you can type which python into your command line (Terminal) and it should give you the path. Mine is at /usr/local/bin/python.
Don’t forget to add a comma at the end of your additional line!
Now, if you don’t have PANDAS installed, you need to do one of two things:
If you have Python 3.4 (Released in March), simply type into
pip3 install pandas
If you have a older version of Python:
You will need pip if you don’t have it. Type this into your Terminal
Then you can install PANDAS with this in
pip install pandas
And you are done!