简体   繁体   English

audiolab for python 2.7

[英]audiolab for python 2.7

I have python 2.7 installed in my system and I need to use the audiolab module. 我在我的系统中安装了python 2.7,我需要使用audiolab模块。 I downloaded from the following site: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab 我从以下网站下载: http//www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab

When I import scikits.audiolab I get the following error: 当我导入scikits.audiolab时,我收到以下错误:

    Traceback (most recent call last):
    File "C:/Python27/trystuff", line 1, in <module>

    from scikits.audiolab import formatinfo as format

     File "C:\Python27\lib\site-packages\scikits\__init__.py", line 1, in <module>

    __import__('pkg_resources').declare_namespace(__name__)

    ImportError: No module named pkg_resources

What should I do? 我该怎么办?

There is a Windows binary build of scikits.audiolab (and a whole lot of other stuff) for python 2.7 here: python 2.7有一个Windows二进制构建的scikits.audiolab(还有很多其他东西):
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikits.audiolab

audiolab will also require libsndfile. audiolab还需要libsndfile。 The link is right there on that page, but I'll put it here too since libsndfile is great: 链接就在那个页面上,但是我也会把它放在这里因为libsndfile很棒:
http://www.mega-nerd.com/libsndfile/#Download http://www.mega-nerd.com/libsndfile/#Download

PS: You will need to put the libsndfile-1.dll someplace python can find it. PS:你需要把libsndfile-1.dll放到某个地方python可以找到它。 If you don't mind wasting at tiny bit of disk space, you can drop a copy of it in the Python27\\Lib\\site-packages\\scikits\\audiolab\\pysndfile directory. 如果您不介意浪费一点点磁盘空间,可以将它的副本放在Python27 \\ Lib \\ site-packages \\ scikits \\ _ audiolab \\ pysndfile目录中。

You need pkg_resources module which is a part of setup_tools or the newer fork distribute . 你需要pkg_resources模块,它是setup_tools或更新的fork 分发的一部分 The site you linked also has Windows binaries for you to install. 您链接的站点也有Windows二进制文件供您安装。 I'd recommend the distribute module. 我推荐分发模块。 They also provide you easy install/uninstall capabilities for third-party modules. 它们还为第三方模块提供了简便的安装/卸载功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM