나는 다음과 같은 작은 프로그램이 있습니다Cython 컴파일 된 응용 프로그램에 Python을 설치해야합니까?
import urllib2,os
urls = ['http://stahlworks.com/dev/sfk/sfk.exe','http://stahlworks.com/dev/sfk/sfk.exe','http://stahlworks.com/dev/sfk/sfk.exe','http://stahlworks.com/dev/sfk/sfk.exe']
for fruit in urls:
url = fruit
file_name = url.split('/')[-1]
u = urllib2.urlopen(url)
f = open(file_name, 'wb')
meta = u.info()
file_size = int(meta.getheaders("Content-Length")[0])
print "Downloading: %s Bytes: %s" % (file_name, file_size)
os.system('cls')
file_size_dl = 0
block_sz = 8192
while True:
buffer = u.read(block_sz)
if not buffer:
break
file_size_dl += len(buffer)
f.write(buffer)
status = r"%10d [%3.2f%%]" % (file_size_dl, file_size_dl * 100./file_size)
status = status + chr(8)*(len(status)+1)
print status,
f.close()
내가 사이 썬를 사용하여 컴파일 : 내가 컴파일 후
gcc.exe -I"c:\python27\include" -L"c:\python27\libs" hello.c -ohello.exe -lpython27
:
python cython.py --embed -o hello.c h.py
그때 내가 GCC를 사용하여 컴파일을 python27/python27없이 컴퓨터에서 시도 할 때까지 잘 실행됩니다.
The application was unable to start correctly (0xc000007b). Click OK to close the application.
나는이 문제를 해결 얻고 진정한 독립 실행 형 응용 프로그램을 구축 할 수있는 방법이 있나요 : 나는 다음과 같은 오류가 다음 python27x하는 이름?
예 Cython에서는 파이썬에서 "importable"인 컴파일 된 모듈 하나만 얻습니다. –