0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PyQt6およびSIPを入れる際に詰まったのでメモ

Last updated at Posted at 2022-06-04

経緯とか

PyQt6事始めを行うべくSIPをインストールしようとしたらエラーが発生した。数分悩んだので備忘録としてメモ。
どうやらscipyをインストールしたときも同様の事象が発生するっぽい。

結論

pipをアップデートしたら成功した。

sh
pip3 install --upgrade pip

インストール成功時の環境

sh
Python 3.9.1
pip 22.1.2
sh
$ pip freeze
packaging==21.3
ply==3.11
pyparsing==3.0.9
PyQt6==6.3.0
PyQt6-Qt6==6.3.0
PyQt6-sip==13.3.1
sip==6.6.1
toml==0.10.2

エラーについて

なぜバージョンアップでインストールできたのかはまだ分かっていないです。

  • エラー文的には、PEP517を使っているSIPをビルドできないからインストールできないぞと怒っている。
  • お試しでアップグレード前のpipでPEP517を入れて実行してみたけど同様のエラーが発生していた。
sh
ERROR: Could not build wheels for sip which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.2.3; however, version 22.1.2 is available.
You should consider upgrading via the 'test_code/python/pyQtTest/testenv/bin/python3 -m pip install --upgrade pip' command.

エラー文でググると下記のStackoverflowに行き当たって、今に至る。
https://stackoverflow.com/questions/61365790/error-could-not-build-wheels-for-scipy-which-use-pep-517-and-cannot-be-installe

参考:インストール成功時のログ

ちなみにシェルはoh my zshを使ってる。

sh
(testenv) ➜  pyQtTest pip3 install --upgrade pip
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 4.9 MB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-22.1.2
(testenv) ➜  pyQtTest pip install sip           
Collecting sip
  Downloading sip-6.6.1-cp37-abi3-macosx_10_9_universal2.whl (700 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 700.4/700.4 kB 6.6 MB/s eta 0:00:00
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: setuptools in ./testenv/lib/python3.9/site-packages (from sip) (49.2.1)
Collecting ply
  Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Installing collected packages: ply, toml, pyparsing, packaging, sip
Successfully installed packaging-21.3 ply-3.11 pyparsing-3.0.9 sip-6.6.1 toml-0.10.2
(testenv) ➜  pyQtTest vscode
zsh: command not found: vscode
(testenv) ➜  pyQtTest pip -V
pip 22.1.2 from /test_code/python/pyQtTest/testenv/lib/python3.9/site-packages/pip (python 3.9)
(testenv) ➜  pyQtTest pip install pyqt6
Collecting pyqt6
  Downloading PyQt6-6.3.0-cp37-abi3-macosx_10_14_universal2.whl (11.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 14.0 MB/s eta 0:00:00
Collecting PyQt6-sip<14,>=13.2
  Downloading PyQt6_sip-13.3.1-cp39-cp39-macosx_10_9_x86_64.whl (76 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.5/76.5 kB 2.9 MB/s eta 0:00:00
Collecting PyQt6-Qt6>=6.3.0
  Downloading PyQt6_Qt6-6.3.0-py3-none-macosx_10_14_x86_64.whl (34.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.6/34.6 MB 15.1 MB/s eta 0:00:00
Installing collected packages: PyQt6-Qt6, PyQt6-sip, pyqt6
Successfully installed PyQt6-Qt6-6.3.0 PyQt6-sip-13.3.1 pyqt6-6.3.0
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?