1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WARNING: The Python tkinter extension was not compiled and GUI subsystem has been detected. Missing the Tk toolkit?の対処法

Posted at

事の起こり

pyenvで最新版のPython(Python 3.12.1)をインストールしようとした時に以下の警告が表示されました。

WARNING: The Python tkinter extension was not compiled and GUI subsystem has been detected. Missing the Tk toolkit?

対処法

Homebrewでpython-tkをインストールします。

brew install python-tk

再度pyenvでPython 3.12.1をインストールします。今度は成功しました。

$ pyenv install 3.12.1
python-build: use openssl@3 from homebrew
python-build: use readline from homebrew
Downloading Python-3.12.1.tar.xz...
-> https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tar.xz
Installing Python-3.12.1...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.12.1 to /Users/yuhkiyano/.anyenv/envs/pyenv/versions/3.12.1

Reference

1
1
2

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?