Loading a library in python from a local path
If all else fails, and you really do want to edit your source code, you’ll need to edit
sys.path is a list of locations where Python will look for code.
In your code, write:
import sys sys.path.append("/path/to/your/tweepy/directory") import tweepy Creating a class in python
class Shape: def __init__(self,x,y): self.x = x self.y = y description = "This shape has not been described yet" author = "Nobody has claimed to make this shape yet" def area(self): return self.x * self.y def perimeter(self): return 2 * self.x + 2 * self.y def describe(self,text): self.description = text def authorName(self,text): self.author = text def scaleSize(self,scale): self.x = self.x * scale self.y = self.y * scale source : http://sthurlow.com/python/lesson08/ Making own library in python https://www.ibiblio.org/swaroopch/byteofpython/read/making-modules.html