Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

import - Python Cannot Find Module Located in Sub-Directory when Importing QAxContainer from PyQt5

Python appears to be unable to locate the module QAxContainer in PyQt5. The package was installed using Conda and is present in a sub-directory of PyQt5 but cannot be located. Additional testing with pip resulted in the same error.

Ubuntu 20.04
Python 3.8.5

conda list
pyqt5 5.15.2 pypi_0 pypi

from PyQt5 import QAxContainer

ImportError: cannot import name 'QAxContainer' from 'PyQt5' (/home/brian/anaconda3/lib/python3.8/site-packages/PyQt5/init.py)

However, qaxcontainer.py is present in /home/brian/anaconda3/lib/python3.8/site-packages/PyQt5/uic/widget-plugins

question from:https://stackoverflow.com/questions/65927267/python-cannot-find-module-located-in-sub-directory-when-importing-qaxcontainer-f

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There should be QAxContainer.pyd and QAxContainer.pyi at /home/brian/anaconda3/lib/python3.8/site-packages/PyQt5/. If you dont have them maybe there's a problem with the package, try reinstalling PyQt5.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...