最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】折腾pymedia

Python crifan 3641浏览 0评论

1.从pymedia主页中:

http://pymedia.org/

找到下载地方,即sourceforge中。

http://sourceforge.net/projects/pymedia/files/pymedia/

下载到最新版本的:

pymedia-1.3.7.2.win32-py2.4.exe

双击安装。

结果由于我此处安装的Python是2.7,所以,没法安装:

python version 2.4 required which was not found in the registry

2.重新去:

http://sourceforge.net/projects/pymedia/files/pymedia/pymedia-1.3.7.3/

去下载源码版本的:

pymedia-1.3.7.3.tar.gz

解压后得到文件夹pymedia-1.3.7.3,进入后,执行安装,结果失败:

D:\tmp\dev_tools\python\pymedia\pymedia-1.3.7.3.tar\pymedia-1.3.7.3\pymedia-1.3.7.3>setup.py install
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]:y
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\pymedia
copying inst_lib\meta.py -> build\lib.win32-2.7\pymedia
copying inst_lib\player.py -> build\lib.win32-2.7\pymedia
copying inst_lib\__init__.py -> build\lib.win32-2.7\pymedia
creating build\lib.win32-2.7\pymedia\audio
copying inst_lib\audio\__init__.py -> build\lib.win32-2.7\pymedia\audio
creating build\lib.win32-2.7\pymedia\video
copying inst_lib\video\__init__.py -> build\lib.win32-2.7\pymedia\video
creating build\lib.win32-2.7\pymedia\video\ext_codecs
copying inst_lib\video\ext_codecs\__init__.py -> build\lib.win32-2.7\pymedia\video\ext_codecs
creating build\lib.win32-2.7\pymedia\removable
copying inst_lib\removable\__init__.py -> build\lib.win32-2.7\pymedia\removable
running build_ext
building 'pymedia.audio.sound' extension
error: Unable to find vcvarsall.bat

3.然后看到对应的README中的关于安装部分的解释:

Installation

  The installation is pretty simple is you have Python 2.3+ installed.

  Just type: "python setup.py build" as normal user and

  "python setup.py install" as superuser. You may wish to run latter without

  the first one. As superuser of course.

  If you wish to be able to play movies, you’ll need SDL/DirectFB to be installed.

  For Windows users there is a better way of making it work:

      Just download binaries from the web site, run it and you’re all set.

所以,再去试试build,结果同样错误:

D:\tmp\dev_tools\python\pymedia\pymedia-1.3.7.3.tar\pymedia-1.3.7.3\pymedia-1.3.7.3>setup.py build
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]:y
running build
running build_py
running build_ext
building 'pymedia.audio.sound' extension
error: Unable to find vcvarsall.bat

4.搞得还是需要手动编辑,很是麻烦,所以暂时懒得折腾了。等有空再说吧。

转载请注明:在路上 » 【记录】折腾pymedia

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. 2.7可以在这里找到: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymedia http://www.lfd.uci.edu/~gohlke/pythonlibs/sn5ub7d9/pymedia-1.3.7.3.win32-py2.7.exe 另外,要多跨平台(至少win和ubuntu)的音乐播放用什么库比较好? pymedia在linux下的编译貌似更加麻烦, 如果预先编译好so和py文件在其他的发行版里面可以使用么 就是绿色化 目前找到的库都无法简单顺利跨平台
    harry15982111年前 (2014-04-04)回复
87 queries in 0.197 seconds, using 22.19MB memory