WinPythonのQt Designerを起動する

2020/01/22 categories:Python| tags:Python|WinPython|Qt|

Qtをインストールして、WinPythonをインストールしましたが、 WinPython フォルダ内のQt Designer.exeをダブルクリックしても何も起きません。

ググってみるとpyqt5-toolsをインストールすれば良いと出てくるので下記コマンドでインストール

pip install pyqt5-tools

*:\****\scripts>pip install pyqt5-tools
Collecting pyqt5-tools
  Downloading https://files.pythonhosted.org/packages/a9/75/dbef00f05e8f190486b96d343a46783073e6e53b0501a7088c732a6a5add/pyqt5_tools-5.13.2.1.6rc1-cp38-none-win_amd64.whl (67.2MB)
     |████████████████████████████████| 67.2MB 6.4MB/s
Requirement already satisfied: click in *:\****\python-3.8.1.amd64\lib\site-packages (from pyqt5-tools) (7.0)
Collecting pyqt5==5.13.2
  Downloading https://files.pythonhosted.org/packages/70/2b/da85277dd9b126d9f422dbfcf0fc8e56ae5c99bd731799f228430b2e1d69/PyQt5-5.13.2-5.13.2-cp35.cp36.cp37.cp38-none-win_amd64.whl (51.7MB)
     |████████████████████████████████| 51.7MB 273kB/s
Collecting python-dotenv
  Downloading https://files.pythonhosted.org/packages/c8/29/774774f808d25bb2a2f43c7bc07b00084a7dd06e2cb48c181acc1c3e80c7/python_dotenv-0.11.0-py2.py3-none-any.whl
Requirement already satisfied: PyQt5_sip<13,>=4.19.19 in *:\****\python-3.8.1.amd64\lib\site-packages (from pyqt5==5.13.2->pyqt5-tools) (12.7.0)
ERROR: spyder 3.3.6 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.13.2 which is incompatible.
ERROR: spyder 3.3.6 has requirement pyqtwebengine<5.13; python_version >= "3", but you'll have pyqtwebengine 5.14.0 which is incompatible.
ERROR: pyqtwebengine 5.14.0 has requirement PyQt5>=5.14, but you'll have pyqt5 5.13.2 which is incompatible.
Installing collected packages: pyqt5, python-dotenv, pyqt5-tools
  Found existing installation: PyQt5 5.14.0
    Uninstalling PyQt5-5.14.0:
      Successfully uninstalled PyQt5-5.14.0
Successfully installed pyqt5-5.13.2 pyqt5-tools-5.13.2.1.6rc1 python-dotenv-0.11.0
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

*:\****\scripts>

Spyder 3.3.6はPyQt5 < 5.13である必要のでPyQt 5.13.2は互換性がないと言っていますがとりあえずこのまま進めます。pipのバージョンが古いと言われたのでとりあえずアップデート

python -m pip install –upgrade pip

*:\****\scripts>pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 595kB/s
ERROR: To modify pip, please run the following command:
*:\****\python-3.8.1.amd64\python.exe -m pip install --upgrade pip
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

*:\****\scripts>python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.3.1
    Uninstalling pip-19.3.1:
      Successfully uninstalled pip-19.3.1
Successfully installed pip-20.0.2

*:\****\scripts>

python -mを付けて実行しろと言われて再度コマンドを実行してインストール完了。しかしこれでもQt Designer.exeは起動しませんでした。

他にもいろいろ対処法はありましたが全部だめで結局site-packages内にあるdesigner.exeを実行すると起動したので、もうそれでいいやということにしました。 designer.exe は下記のフォルダにあります。

winpthonのフォルダ\python-3.8.1.amd64\Lib\site-packages\pyqt5_tools\Qt\bin

designer.exeのショートカットを作っておけばそれっぽくなるのでとりあえずこれでOKとしました

これで無事Qt Designerが使えるようになりました。

Share post

Related Posts

コメント