Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
The problem that pychar does not recognize pyqt5 is shown in the figure. When pyqt5 is referenced, the error “module not found error: no module named ‘pyqt5′” is displayed
First, make sure that pyqt5 has been installed successfully
In the path of Python/python36/lib/site packages, see if there are pyqt5 related libraries. If pyqt5 is successfully referenced through Python commands, it means that pyqt5 is installed without problems. Python environment variable configuration is generally no problem, very few, if there is, it can not run
The latest version of pychar creates a python virtual environment by itself. By default, the third-party library you installed is not added to it, which causes this problem. In addition, when you create a new project, the label of project iterpreter is hidden and you can’t notice it. You need to open it manually, as shown in the following figure
。
Solution 1: when creating a new project, check the two boxes as shown in the figure below to load the third-party library
In this way, a pile of things will be loaded when the project is created. Another way is to use the following existing interpreter to handle it. Click the configuration button
If you have already built a project and don’t want to repeat the existing work, don’t worry, there are still ways
Find the external libraries at the end of the existing project, then find the venv directory, and change the following parameters in the pyvenv.cfg file to true
include-system-site-packages = true
It’s done
If you don’t find pyvenv.cfg, in your settings – > In the directory of projiect interpreter, find the file, modify it with Notepad, and then save it
Similar Posts:
- import win32api; Importerror: DLL load failed: the specified program was not found
- Error reporting of importing tensorflow package from pycharm
- [Solved] Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- [Solved] QT operate error: exited with code – 1073741515
- Project interpreter not specified(eclipse+pydev)
- Pychar can’t install the third-party library, the solution of error code non zero exit code (1)
- Note that pyqt5 tools cannot be installed on Mac
- [Solved] LD: library not found for – XXX when Xcode compiles code
- Python pip install three-party library unsuccessful error: WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available
- Pyinstaller publishes exe and pops up failed to execute script main