I have the following code:
import sys
reload(sys)
sys.setdefaultencoding('utf8')#@UndefinedVariable
import phantomjs
if __name__ == '__main__':
print ';'.join(sys.path)
I followed sth's answer in Permanently add a directory to PYTHONPATH
and added the phantomjs.pth file to ~/.local/lib/python2.7/site-packages which is where
python -c 'import site; site._script()' --user-site
told me I needed to add the pth files. In the phantomjs.pth file, I put the path where the phantomjs.py file is: /workspace/rankingmodel
It works for the python interpreter as
print ';'.join(sys.path)
prints out (amongst others) /workspace/rankingmodel but eclipse marks
import phantomjs
with the error
Unresolved Import
How can I make that Eclispe and PyDev see the PYTHONPATH which I put in the .pth file?