t-SNEを試すためにbhtsneをインストールしようとして失敗しました。
#使用環境
- Mac OS Big Sur
- Anaconda
#エラー内容
入力
!pip install bhtsne
出力
Using cached bhtsne-0.1.9.tar.gz (86 kB)
Requirement already satisfied: numpy in /Users/apple/opt/anaconda3/envs/Test1/lib/python3.8/site-packages (from bhtsne) (1.19.2)
Requirement already satisfied: cython in /Users/apple/opt/anaconda3/envs/Test1/lib/python3.8/site-packages (from bhtsne) (0.29.22)
Building wheels for collected packages: bhtsne
Building wheel for bhtsne (setup.py) ... error
ERROR: Command errored out with exit status 1:
......
(省略)
......
error: command 'gcc' failed with exit status 1
#解決策
原因はXcodeのセットアップツールがインストールされていないことだったようです。
Xcodeを起動してインストールするか、Terminalでxcode-select --install
を入力・実行する。
私は後者を実施して解決しました。