I am trying to install PyQt5 and PyQtChart on Python 3.6.9, but I am getting a ModuleNotFoundError: No module named 'PyQt5.sip' error when I try to import PyQt5.QtCore. I have tried both pip3 and downloading the zip folder, but neither of those have worked. My end goal is to run a candlestick chart using PyQt5.
The error you are encountering is likely due to a missing or misconfigured installation of PyQt5. To resolve this issue, you can try the following steps:
First, make sure you have the latest version of pip installed by running pip install --upgrade pip.
Uninstall PyQt5, PyQtChart, and sip (if installed) by running the following commands:
Once the installations are complete, try importing PyQt5.QtCore in your Python script again. It should work without any ModuleNotFoundError.
If you are still facing issues, it’s possible that there is a problem with your Python environment. In that case, you may want to consider creating a virtual environment and installing PyQt5 and PyQtChart within it to isolate your dependencies.
Note: Make sure you are using the correct Python interpreter when running the pip commands. If you have multiple versions of Python installed, you might need to use pip3 instead of pip to ensure the packages are installed for Python 3.