I have installed this python module https://github.com/gunthercox/ChatterBot and now I downloaded the project to modify things locally. The problem is that when I execute an example of the examples
folder, it still loads the installed package. I tried Importing modules from parent folder but it says:
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import chatterbot
Parent module '' not loaded, cannot perform relative import
I think it will only work for simple .py
files, not an entire project. Tried this answer from the same question and it worked but broke for all the other imports inside the project.
Shouldn't these examples be adapted to work locally already, as they're rapidly tested by the developer? How to import the package locally?