在Python 3.3中安装PyMedia的问题

时间:2013-08-18 15:58:11

标签: python c python-3.x syntax-error windows-7-x64

所以我现在一直试图安装PyMedia,我已经经历了很多故障排除步骤来到这里。我现在在哪里,我已经安装了MinGW的二进制文件,并进行了更新。然后,当我尝试运行安装文件时,会出现一些错误,但我可以继续使用它们,但是,在这些错误之后,我在程序acodec.c中得到一个长字符串指针问题。

C:\Python33\Lib\pymedia-1.3.7.3>python setup.py build_ext --compiler=mingw32
Using WINDOWS configuration...

('Path for ', 'OGG', 'not found.')
('Path for ', 'VORBIS', 'not found.')
('Path for ', 'FAAD', 'not found.')
('Path for ', 'MP3LAME', 'not found.')
('Path for ', 'VORBISENC', 'not found.')
('Path for ', 'ALSA', 'not found.')
Continue building pymedia ? [Y,n]:
running build_ext
building 'pymedia.audio.acodec' extension
creating build\temp.win32-3.3\Release\audio
creating build\temp.win32-3.3\Release\audio\acodec
creating build\temp.win32-3.3\Release\audio\libavcodec
creating build\temp.win32-3.3\Release\audio\libavcodec\liba52
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DBUILD_NUM=1878 -DWIN32 -DHAVE_AV_CONFIG_H -DUDF_CACHE=1 -IC:\Python33\Lib\pymedia-1.3.7.3 -Iaudio/ -IC:\Python33\include -IC:\Python33\include -c audio\acodec/acodec.c -o build\temp.win32-3.3\Release\audio\acodec\acodec.o
audio\acodec/acodec.c:217: error: 'getreadbufferproc' undeclared here (not in a function)
audio\acodec/acodec.c:217: error: expected '}' before 'acstring_buffer_getbuf'
audio\acodec/acodec.c: In function 'acstring_str':
audio\acodec/acodec.c:227: warning: implicit declaration of function 'PyString_FromStringAndSize'
audio\acodec/acodec.c:227: warning: return makes pointer from integer without acast
audio\acodec/acodec.c: At top level:
audio\acodec/acodec.c:233: warning: missing braces around initializer
audio\acodec/acodec.c:233: warning: (near initialization for 'ACStringType.ob_base.ob_base')
audio\acodec/acodec.c:235: warning: initialization makes integer from pointer without a cast
audio\acodec/acodec.c:238: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:245: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:249: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:250: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:252: warning: initialization makes integer from pointer without a cast
audio\acodec/acodec.c:253: warning: initialization makes pointer from integer without a cast
audio\acodec/acodec.c:254: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:272: warning: initialization from incompatible pointer type
audio\acodec/acodec.c: In function 'SetStructVal':
audio\acodec/acodec.c:279: warning: implicit declaration of function 'PyInt_Check'
audio\acodec/acodec.c:282: warning: implicit declaration of function 'PyInt_AsLong'
audio\acodec/acodec.c: In function 'SetExtraData':
audio\acodec/acodec.c:291: warning: implicit declaration of function 'PyString_Check'
audio\acodec/acodec.c:294: warning: implicit declaration of function 'PyString_Size'
audio\acodec/acodec.c:298: warning: implicit declaration of function 'PyString_AsString'
audio\acodec/acodec.c:298: warning: passing argument 2 of 'memcpy' makes pointer from integer without a cast
audio\acodec/acodec.c: In function 'SetAttribute':
audio\acodec/acodec.c:305: warning: implicit declaration of function 'PyInt_FromLong'
audio\acodec/acodec.c:305: warning: initialization makes pointer from integer without a cast
audio\acodec/acodec.c: In function 'Codec_GetID':
audio\acodec/acodec.c:362: warning: return makes pointer from integer without acast
audio\acodec/acodec.c: At top level:
audio\acodec/acodec.c:405: warning: missing braces around initializer
audio\acodec/acodec.c:405: warning: (near initialization for 'FrameType.ob_base.ob_base')
audio\acodec/acodec.c:407: warning: initialization makes integer from pointer without a cast
audio\acodec/acodec.c:410: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:422: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:425: warning: initialization makes pointer from integer without a cast
audio\acodec/acodec.c:426: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:434: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:435: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:442: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:444: warning: initialization from incompatible pointer type
audio\acodec/acodec.c: In function 'ACodec_Encode':
audio\acodec/acodec.c:668: warning: pointer targets in passing argument 2 of 'avcodec_encode_audio' differ in signedness
audio\acodec/acodec.c:677: warning: assignment makes pointer from integer without a cast
audio\acodec/acodec.c: At top level:
audio\acodec/acodec.c:823: warning: missing braces around initializer
audio\acodec/acodec.c:823: warning: (near initialization for 'DecoderType.ob_base.ob_base')
audio\acodec/acodec.c:825: warning: initialization makes integer from pointer without a cast
audio\acodec/acodec.c:828: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:840: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:843: warning: initialization makes pointer from integer without a cast
audio\acodec/acodec.c:844: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:851: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:860: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:861: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:862: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:887: warning: missing braces around initializer
audio\acodec/acodec.c:887: warning: (near initialization for 'EncoderType.ob_base.ob_base')
audio\acodec/acodec.c:889: warning: initialization makes integer from pointer without a cast
audio\acodec/acodec.c:892: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:904: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:907: warning: initialization makes pointer from integer without a cast
audio\acodec/acodec.c:908: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:915: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:924: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:925: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:926: warning: initialization from incompatible pointer type
audio\acodec/acodec.c:944: warning: return type defaults to 'int'
audio\acodec/acodec.c: In function 'DL_EXPORT':
audio\acodec/acodec.c:944: error: expected declaration specifiers before 'initacodec'
audio\acodec/acodec.c:1005: error: expected '{' at end of input
error: command 'gcc' failed with exit status 1

C:\Python33\Lib\pymedia-1.3.7.3>

知道我能做些什么来解决这个问题?简而言之,我对C,C ++和Python的经验很少。因此,如果您的解释可以简化,我将非常感激。谢谢。

1 个答案:

答案 0 :(得分:0)

我正沿着pygame.cdrom路线前进,这是我的第一个选择。