为了账号安全,请及时绑定邮箱和手机立即绑定

尝试使用 PyCharm 在 Mac 操作系统上安装 PyQtWebEngine

尝试使用 PyCharm 在 Mac 操作系统上安装 PyQtWebEngine

牛魔王的故事 2022-11-24 14:57:45
我对此很陌生,不知道该怎么做。在 PyCharm 中运行文件时,我收到此消息:File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/aqt/qt.py", line 16, in <module>    from PyQt5.QtWebEngineWidgets import *  # type: ignoreModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'所以我去了文件夹:/Library/Frameworks/Python.framework/Versions/3.8我输入了这个:python get-pip.pyDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-supportDefaulting to user installation because normal site-packages is not writeableCollecting pip  Using cached pip-20.1-py2.py3-none-any.whl (1.5 MB)Installing collected packages: pip  Attempting uninstall: pip    Found existing installation: pip 20.1    Uninstalling pip-20.1:      Successfully uninstalled pip-20.1  WARNING: The scripts pip, pip2 and pip2.7 are installed in '/Users/al/Library/Python/2.7/bin' which is not on PATH.  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.  NOTE: The current PATH contains path(s) starting with `~`, which may not be expanded by all applications.并试图输入这个:% pip install PyQtWebEnginezsh: command not found: pip任何人都可以就我做错了什么以及为什么即使我在 3.8 文件夹中它使用 Python 2 给我建议吗?
查看完整描述

1 回答

?
素胚勾勒不出你

TA贡献1827条经验 获得超9个赞

我不确定我是否理解你的问题,但如果我会回答你我认为你的问题。请告诉我,如果我理解错了。所以你去命令提示符并写: pip install PyQtWebEngine 我认为这不重要但无论如何都要这样做。然后如果你有 PyCharm(你做什么)去文件然后设置。在设置中转到项目:_______(<- 您的项目名称)。按它左边的那个箭头。然后转到 Project Interpreter 并单击它。在那里你会看到你的程序的所有已安装包。所以,你没有 PyQtWebEngine。转到右侧的那个 + 按钮。然后你必须搜索你需要的任何包(现在:PyQtWebEngine)并按下它。然后在该窗口的下方,您会看到“安装包”按钮并按下它。片刻之后(时间取决于您的计算机),它将被安装。您可以安装所有不需要的软件包。我不知道,也许这只是我,但以防万一,这是我不想告诉你的:如果你开始一个新的,你可能必须总是再次安装包(你必须安装)项目。希望我解决了你的问题:)



查看完整回答
反对 回复 2022-11-24
  • 1 回答
  • 0 关注
  • 162 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信