Python을 사용하여 Cocoa 응용 프로그램을 개발하려고합니다. Mac을 처음 사용하기 때문에 작동 원리를 이해하려면 도움이 필요합니다.코코아 개발을위한 Mac OS에서의 Python 설치 개념 이해
우선 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
내 질문 :
내가 py2objc를 설치해야 할 일은- ? 죄송합니다. 오류를위한 해결책을 찾았습니다. 그 (것)들을 나는 게시했습니다.
- 나는 을 이해하므로 파이썬에는 두 가지 종류가 있습니다. 하나는 응용 프로그램 폴더에 설치된 (IDLE, 시작 프로그램)이고 다른 하나는 OS와 함께 제공된 현재 파이썬 버전입니다. 의 차이점을 설명해 주시겠습니까?
- Mac OS에서 사용하는 Python의 현재 버전을 어떻게 선택할 수 있습니까? 현재 폴더는 /라이브러리 /Frameworks/Python.framework에 있습니까?
아마도 혼란스러워 보일 것입니다. 그러나 이것은 나의 첫 걸음입니다! :) 고마워요
일부 포함 파일을 찾을 수 없습니다. 이는 include-dir이 잘못 설정되었음을 의미합니다. include dir을 지정하는 방법에 대한이 질문을 참조하십시오 : http://stackoverflow.com/questions/4753127 누락 된 include 파일은'/ usr/include'에 있습니다. –