0

Python を使って Cocoa アプリケーションを開発してみたいと思っています。私は Mac を初めて使用するので、その仕組みを理解するために助けが必要です。

まず、py2app と py2objc をインストールする必要があることがわかりました。hereに記載されているように、easy_installを使用しました。セットアップ ツールにいくつかのエラーがありましたが、最終的に py2app がインストールされました。次に、「 」を起動easy_install pyobjc==2.2すると、多くのエラーが発生して終了しました。

Processing pyobjc-2.2-py2.7.egg
    ...
Running pyobjc-framework-SystemConfiguration-2.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ipMzFU/pyobjc-framework-SystemConfiguration-2.2/egg-dist-tmp-odfVol
    In file included from Modules/_manual.m:1:
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:19:20: error: limits.h: No such file or directory
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:22:2: error: #error "Something's broken.  UCHAR_MAX should be defined in limits.h."
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:26:2: error: #error "Python's source code assumes C's unsigned char is an 8-bit type."
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:19: error: stdio.h: No such file or directory
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:35:5: error: #error "Python.h requires that stdio.h define NULL."
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:38:20: error: string.h: No such file or directory
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:40:19: error: errno.h: No such file or directory
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:42:20: error: stdlib.h: No such file or directory
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:44:20: error: unistd.h: No such file or directory
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:56:20: error: assert.h: No such file or directory
...
etc

私の質問:

  1. py2objc をインストールするには何が必要ですか? 残念ながら、以前に投稿したエラーの解決策は見つかりませんでした。
  2. 私が理解しているように、Pythonには2種類あります。1 つは Applications フォルダー (IDLE、ランチャー) にインストールしたもので、もう 1 つは OS に付属している現在の Python バージョンです。違いを説明できますか?
  3. Mac OS で使用されている Python の現在のバージョンを選択するにはどうすればよいですか? /Library/Frameworks/Python.framework の Current フォルダーは何ですか?

ややこしいかもしれませんが、これが私の最初のステップです。:) ありがとうございました

4

1 に答える 1