1

This is the most weird problem I ever faced, I can't import QtChart from PyQt5 although I have it installed. I have tried a lot, but I can't figure out the actual solution. I have tried reinstalling multiple times. I have tried every single possible fix. But none helped. And the most weird thing is, the import color is in yellow. Whenever I tell my code editor to import a wrong module, it becomes in white color (See this image of my code editor). But when I import right modules, it's yellow. Now for this case, it's yellow, but it's still saying can't import the module.

I get import error, Import "PyQt5.QtChart" could not be resolved from source (PylancereportMissingModuleSource)

The code I wrote:

from PyQt5.QtChart import QCandlestickSeries, QChart, QChartView
Araf
  • 27
  • 4
  • what happens when you open a terminal and manually import this module? What error are you getting? –  Feb 23 '22 at 14:53
  • Sembai Norimaki I get import error, Import "PyQt5.QtChart" could not be resolved from source (PylancereportMissingModuleSource) – Araf Feb 23 '22 at 14:54
  • don't make a comment. Post the errors you are getting as properly formatted text. Also explain the different steps you made. –  Feb 23 '22 at 15:01
  • Did you try installing the library globally? – Syed M. Sannan Feb 23 '22 at 15:11
  • Yes I installed the library golablly – Araf Feb 23 '22 at 15:36
  • Please run that import command in an *actual* terminal/shell/prompt with the python interactive shell, not inside vscode, as you're probably using the wrong python interpreter there. – musicamante Feb 23 '22 at 15:57

0 Answers0