本文章是百篇文章学PyQT的第三篇,本文讲述如何使用PIP安装PyQT6,PyQT6在安装过程中会遇到很多问题,博主在本篇文章中将遇到和踩过的坑总结出来,可以供大家参考,希望大家安装顺利。包括 安装、遇到问题的解决方案、怎么解决所有问题,让PYQT6环境完整搭建起来;

本文作者原创,未经允许禁止转载。
PyQT6 pip install (三) 百篇文章学PyQT目录
右键管理员权限打开工具进行安装PYQT6

首先要安装
pip install sip
pip 要版本足够,pip 升级方法:
python -m pip install --upgrade pip
安装PyQt6
pip install PyQt6
安装PyQt6-tools:
pip install pyqt6-tools
网速满可以换国内站
- 清华镜像: https://pypi.tuna.tsinghua.edu.cn/simple
- 中国科学技术大学 : https://pypi.mirrors.ustc.edu.cn/simple
- 豆瓣: http://pypi.douban.com/simple/
- 阿里云: http://mirrors.aliyun.com/pypi/simple/
-
- 用法
- pip install PyQT6 -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
- pip install PyQT6-tools -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
安装成功后会有成功提示

输入命令查看是否有安装成功信息
pip show PyQt6

安装QT其它依赖
QtWebEngineWidgets模块
pip install PyQtWebEngine
Python图形库,必须安装
pip install PySide6
- pip install opencv-python
- pip install opencv_contrib-python
本文环境: Python 3.11.0 PYQT6 Anaconda3 conda 4.5.11
- Package Version
- ---------------------------------- ---------
- alabaster 0.7.11
- anaconda-client 1.7.2
- anaconda-navigator 1.9.2
- anaconda-project 0.8.2
- appdirs 1.4.3
- asn1crypto 0.24.0
- astroid 2.0.4
- astropy 3.0.4
- atomicwrites 1.2.1
- attrs 18.2.0
- Automat 0.7.0
- Babel 2.6.0
- backcall 0.1.0
- backports.shutil-get-terminal-size 1.0.0
- beautifulsoup4 4.6.3
- bitarray 0.8.3
- bkcharts 0.2
- blaze 0.11.3
- bleach 2.1.4
- bokeh 0.13.0
- boto 2.49.0
- Bottleneck 1.2.1
- certifi 2018.8.24
- cffi 1.11.5
- chardet 3.0.4
- click 7.1.2
- cloudpickle 0.5.5
- clyent 1.2.2
- colorama 0.3.9
- comtypes 1.1.7
- conda 4.5.11
- conda-build 3.15.1
- constantly 15.1.0
- contextlib2 0.5.5
- cryptography 2.3.1
- cycler 0.10.0
- Cython 0.28.5
- cytoolz 0.9.0.1
- dask 0.19.1
- datashape 0.5.4
- decorator 4.3.0
- defusedxml 0.5.0
- distributed 1.23.1
- docutils 0.14
- entrypoints 0.2.3
- et-xmlfile 1.0.1
- fastcache 1.0.2
- filelock 3.0.8
- Flask 1.0.2
- Flask-Cors 3.0.6
- gevent 1.3.6
- glob2 0.6
- greenlet 0.4.15
- h5py 2.8.0
- heapdict 1.0.0
- html5lib 1.0.1
- hyperlink 18.0.0
- idna 2.7
- imageio 2.4.1
- imagesize 1.1.0
- incremental 17.5.0
- ipykernel 4.10.0
- ipython 6.5.0
- ipython_genutils 0.2.0
- ipywidgets 7.4.1
- isort 4.3.4
- itsdangerous 0.24
- jdcal 1.4
- jedi 0.12.1
- Jinja2 2.10
- jsonschema 2.6.0
- jupyter 1.0.0
- jupyter-client 5.2.3
- jupyter-console 5.2.0
- jupyter-core 4.4.0
- jupyterlab 0.34.9
- jupyterlab-launcher 0.13.1
- keyring 13.2.1
- kiwisolver 1.0.1
- lazy-object-proxy 1.3.1
- llvmlite 0.24.0
- locket 0.2.0
- lxml 4.2.5
- MarkupSafe 1.0
- matplotlib 2.2.3
- mccabe 0.6.1
- menuinst 1.4.14
- mistune 0.8.3
- mkl-fft 1.0.4
- mkl-random 1.0.1
- more-itertools 4.3.0
- mpmath 1.0.0
- msgpack 0.5.6
- multipledispatch 0.6.0
- navigator-updater 0.2.1
- nbconvert 5.4.0
- nbformat 4.4.0
- networkx 2.1
- nltk 3.3
- nose 1.3.7
- notebook 5.6.0
- numba 0.39.0
- numexpr 2.6.8
- numpy 1.15.1
- numpydoc 0.8.0
- odo 0.5.1
- olefile 0.46
- opencv-contrib-python 4.6.0.66
- opencv-python 4.6.0.66
- openpyxl 2.5.6
- packaging 17.1
- pandas 0.23.4
- pandocfilters 1.4.2
- parso 0.3.1
- partd 0.3.8
- path.py 11.1.0
- pathlib2 2.3.2
- patsy 0.5.0
- pep8 1.7.1
- pickleshare 0.7.4
- Pillow 5.2.0
- pip 22.3.1
- pkginfo 1.4.2
- pluggy 0.7.1
- ply 3.11
- prometheus-client 0.3.1
- prompt-toolkit 1.0.15
- psutil 5.4.7
- py 1.6.0
- pyasn1 0.4.4
- pyasn1-modules 0.2.2
- pycodestyle 2.4.0
- pycosat 0.6.3
- pycparser 2.18
- pycrypto 2.6.1
- pycurl 7.43.0.2
- pyflakes 2.0.0
- Pygments 2.2.0
- pylint 2.1.1
- pyodbc 4.0.24
- pyOpenSSL 18.0.0
- pyparsing 2.2.0
- PyQt5 5.15.7
- PyQt5-Qt5 5.15.2
- PyQt5-sip 12.11.0
- PyQt6 6.1.0
- pyqt6-plugins 6.1.0.2.2
- PyQt6-Qt6 6.4.1
- PyQt6-sip 13.4.0
- pyqt6-tools 6.1.0.3.2
- PyQtWebEngine 5.15.6
- PyQtWebEngine-Qt5 5.15.2
- PySide6 6.4.0.1
- PySide6-Addons 6.4.0.1
- PySide6-Essentials 6.4.0.1
- PySocks 1.6.8
- pytest 3.8.0
- pytest-arraydiff 0.2
- pytest-astropy 0.4.0
- pytest-doctestplus 0.1.3
- pytest-openfiles 0.3.0
- pytest-remotedata 0.3.0
- python-dateutil 2.7.3
- python-dotenv 0.21.0
- pytz 2018.5
- PyWavelets 1.0.0
- pywin32 223
- pywinpty 0.5.4
- PyYAML 3.13
- pyzmq 17.1.2
- qt6-applications 6.1.0.2.2
- qt6-tools 6.1.0.1.2
- QtAwesome 0.4.4
- qtconsole 4.4.1
- QtPy 1.5.0
- requests 2.19.1
- rope 0.11.0
- ruamel_yaml 0.15.46
- scikit-image 0.14.0
- scikit-learn 0.19.2
- scipy 1.1.0
- seaborn 0.9.0
- Send2Trash 1.5.0
- service-identity 17.0.0
- setuptools 40.2.0
- shiboken6 6.4.0.1
- simplegeneric 0.8.1
- singledispatch 3.4.0.3
- sip 6.7.5
- six 1.11.0
- snowballstemmer 1.2.1
- sortedcollections 1.0.1
- sortedcontainers 2.0.5
- Sphinx 1.7.9
- sphinxcontrib-websupport 1.1.0
- spyder 3.3.1
- spyder-kernels 0.2.6
- SQLAlchemy 1.2.11
- statsmodels 0.9.0
- sympy 1.1.1
- tables 3.4.4
- tblib 1.3.2
- terminado 0.8.1
- testpath 0.3.1
- toml 0.10.2
- toolz 0.9.0
- tornado 5.1
- tqdm 4.26.0
- traitlets 4.3.2
- Twisted 18.7.0
- unicodecsv 0.14.1
- urllib3 1.23
- wcwidth 0.1.7
- webencodings 0.5.1
- Werkzeug 0.14.1
- wheel 0.31.1
- widgetsnbextension 3.4.1
- win_inet_pton 1.0.1
- win-unicode-console 0.5
- wincertstore 0.2
- wrapt 1.10.11
- xlrd 1.1.0
- XlsxWriter 1.1.0
- xlwings 0.11.8
- xlwt 1.3.0
- zict 0.1.3
- zope.interface 4.5.0
需要先将pip升级到最新才能下载,否则会报错;

