Solve the path problem in eclipse pydev

If you copy a bundle of python codes into eclipse, usually the pydev can not find the paths. In this case, you have 2 two ways to deal with this problem.

  1. right click the folder -> pydev -> Set as Source Folder (add to python path)
  2. insert the path with code: sys.path.insert(0, “your file path”) or sys.path.append(“your file path”)
    for example: sys.path.insert(0, “../smartphone”)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.