2013-09-01 8 views
2

Windows 컴퓨터에 pycrypto를 설치하려고합니다. 나는 mingw를 설치했고 distutils가 그것을 사용하고있다. 나는이 발견,하지만 난 핍 해결 그것으로 설치하는 방법을 잘 모르겠습니다 :Windows 가상화 도구에 pycrypto를 설치할 수 없습니다.

In file included from C:\Python27\include/pyconfig.h:68:0, 

from C:\Python27\include/Python.h:8, 

from src/winrand.c:33: 

c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:301:1: error: unknown type name 'off64_t' 

c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:301:36: error: unknown type name 'off64_t' 

c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:302:1: error: unknown type name 'off64_t' 

c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:302:39: error: unknown type name 'off64_t' 

src/winrand.c:38:0: warning: "_WIN32_WINNT" redefined [enabled by default] 

In file included from c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/_mingw.h:35:0, 

from c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:27, 

from C:\Python27\include/pyconfig.h:68, 

from C:\Python27\include/Python.h:8, 

from src/winrand.c:33: 

c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/sdkddkver.h:154:0: note: this is the location of the previous definition 

error: command 'gcc' failed with exit status 1 

편집 : 여기에 오류가 나는 점점 오전 것입니다. http://ac-archive.sourceforge.net/largefile/largefiles_win32.print.html

+0

어딘가에 두 개를 섞어 쓰는 것처럼 32 대 64 비트 문제 일 수 있습니까? – martineau

+0

그게 처음에 생각한거야. 그래서 내 컴퓨터 전체를 지워 버리고 32 비트 항목 만 골라서 시작했다. – Greg

+1

과 관련있을 수 있습니다. https://github.com/pagespeed/ngx_pagespeed/issues/166 –

답변

2

Windows에서 Fabric을 빌드 할 때 동일한 문제가 발생했습니다. pycrypto를 만들 때 그 이유는 mingw32의 gcc 설정이었습니다. configure에서 gcc의 -std 설정은 c99로 설정됩니다. 그러나 -std가 c99 인 경우 __STRICT_ANSI__이 정의되며 "sys/types.h"의 typedef _off_t off_t 및 _off64_t off64_t는 건너 뜁니다. mingw32에서 sys/types.h를 수정하여 pycrypto를 빌드하는 데 성공했지만 잔인했습니다. - http://www.voidspace.org.uk/python/modules.shtml -

0
  1. VIRTUALENV 만들기가

  2. 이 pycrypto의 바이너리 다운로드 (나는 일반적으로 바탕 화면에있는 모든 광산을 넣어) (지금의 같은 python3에 대한 지원하지 않습니다 설치된 파이썬 버전 및 아키텍처와 일치) easy_install C:\path\to\the\download\pycrypto-2.6.win-amd64-py2.7.exe

  3. ,369 다음 VIRTUALENV 폴더 내에서 easy_install을 실행에

  4. 탐색은 (Lib\site-packages 이하)에는 설치 pycrypto 생성 및 실행

관련 문제