in abov code how can i import all library in my program
I don't understand what you're asking; can you rephrase it while also providing more detail?
Is it possible that read text from an image without using any third party APIs?
Sure, you can write a solution yourself. Be aware that OCR is a hard topic, and the subject of ongoing research, so be prepared to spend weeks or months on this.