I've installed some modules with pip, but keep receiving a module not found error when I try to import the modules within a file (not from the terminal). Attempting to import in the terminal works fine.
I'm using a Mac, Python 3. I've already tried manually adding the directory to my PYTHONPATH, with no success. The path has been permanently added as far as I know, as you can see further down, I checked the final path after rebooting terminal.
Threads i've tried:
Modules are installed using pip on OSX but not found when importing
Permanently add a directory to PYTHONPATH?
My imported modules are stored in this directory:
/Library/Python/2.7/site-packages
Running python3 -c 'import sys; print(sys.path)' gives:
['', '/Users/(name)', '/Library/Python/2.7/site-packages', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']
I can't think of what else I could be missing. Any advice would be appreciated, thanks!