Sublime Forum

ImportError: No module named wiper

#1

I’m VERY new to python and sublime. I’m currently watching training videos and following along. I ran into a number of issues with sublime but can’t get pass this one. I’m getting the error when trying to import a module into the interpreter i created during training. The wiper.py file is located in Users/marcus/Documents/Scripts/. I’ve printed the current path below. Can someone help me?

[code]>>> import wiper
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named wiper

print (‘PATH = ’ + os.environ’PATH’])
PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/Users/marcus/Documents/Scripts//.rvm/bin:[/code]

0 Likes

#2

Some additional information. i imported sys and ran sys.path and got this information. i don’t know if this is helpful or not.

[code]>>> import sys

sys.path
‘’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC’, ‘/Library/Python/2.7/site-packages’][/code]

0 Likes

#3

This has been resolved by adding the python path to the build

[code]“build_systems”:

{
    "name": "Python",
    "shell_cmd": "python -u \"$file\"",
    "env": {
        "PYTHONPATH": "/Users/marcus/Documents/Scripts"
    },
    "file_regex": "^ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

]
[/code]

0 Likes