简体   繁体   中英

Mac python3 can't import “PyQt5”

I just installed PyQt5 below command.

brew install pyqt5

Successfully, To install is end.

But "from PyQt5.QtCore import *" in Python code cannot import module.

Output message is ImportError: No module named 'PyQt5'

So I check it python path in command line. (python3)

Python环境变量

You can find line, '/usr/local/lib/python3.4/site-packages/PyQt5'

'/usr/local/lib/python3.4/site-packages/PyQt5' include files below.

PyQt5中的文件列表

What is problem in situation. how can I fix that problem?.

All the files under your '/usr/local/lib/python3.4/site-packages/PyQt5' are linked to another folder. Please make sure the linked files exist, or add the linked folder to sys.path and try "import PyQt5" again

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM