1
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 3 years have passed since last update.

MacOS Cataline で psutil のインストールに失敗

Posted at

環境

  • macOS Cataline 10.15.1
  • psutil==5.7.0

psutilは、実行中のプロセスやシステムの利用状況をPythonで取得するためのクロスプラットフォームライブラリ。

状況

psutil を poetryでインストールしようとしたところ、大量のエラーメッセージと共に失敗。

$ poetry install --no-root
Installing dependencies from lock file

Package operations: 35 installs, 0 updates, 0 removals

  - Installing psutil (5.7.0)

    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=570 -DPSUTIL_OSX=1 -I/Users/hinata/.ghq/github.com/Nikkei/b2b-api-article/.venv/include -I/Users/hinata/.pyenv/versions/3.8.2/include/python3.8 -c psutil/_psutil_common.c -o build/temp.macosx-10.14-x86_64-3.8/psutil/_psutil_common.o
    In file included from psutil/_psutil_common.c:9:
    In file included from /Users/hinata/.pyenv/versions/3.8.2/include/python3.8/Python.h:25:
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:64:
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
            unsigned char   *_base;
                            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:93:16: note: insert '_Nullable' if the pointer may be null
            unsigned char   *_base;
                            ^
                              _Nullable
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:93:16: note: insert '_Nonnull' if the pointer should never be null
            unsigned char   *_base;
                            ^
                              _Nonnull
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:138:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
            int     (* _Nullable _read) (void *, char *, int);
                                              ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:138:32: note: insert '_Nullable' if the pointer may be null
            int     (* _Nullable _read) (void *, char *, int);
                                              ^
                                               _Nullable
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:138:32: note: insert '_Nonnull' if the pointer should never be null
            int     (* _Nullable _read) (void *, char *, int);
                                              ^
                                               _Nonnull
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:138:40: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
            int     (* _Nullable _read) (void *, char *, int);
                                                      ^

MacOSX10.14.sdk周りでたくさん怒られるている。

原因

自分のCatalineのバージョンは10.15なので、変だなと思い潜ってるとsdkが2つ存在していてた。

$ cd /Library/Developer/CommandLineTools/SDKs
$ ls 
MacOSX.sdk      MacOSX10.14.sdk MacOSX10.15.sdk

10.14を消したら無事インストールできた。古いものが残っていて干渉を起こしていたようだ。

$ ls sudo rm -rf MacOSX10.14.sdk
Password:
$ ls
MacOSX.sdk      MacOSX10.15.sdk
1
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
1
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?