【发布时间】:2016-01-16 21:08:27
【问题描述】:
我从http://www.lfd.uci.edu/~gohlke/pythonlibs/ 上提供的 .whl 中为 Python 3.4.2 安装了 rtmidi_python,导入工作正常,但只要我调用“rtmidi_python.MidiIn()”,我就会得到一个TypeError如下:
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import rtmidi_python
>>> rtmidi_python.MidiIn()
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
rtmidi_python.MidiIn()
File "rtmidi_python.pyx", line 72, in rtmidi_python.MidiIn.__cinit__ (rtmidi_python.cpp:1440)
TypeError: expected bytes, str found
据我了解,经过一些研究,这意味着包本身或构建的某个地方存在错误,我对此无能为力,但我可能错了。谁能确认一下?
我使用 3.4.2,因为这是当前 Blender 版本使用的 Python 版本。我想在 Blender 游戏引擎中使用 rtmidi-python。 我目前正在使用 Windows 7 32 位,并使用 .whls 安装软件包,因为我没有常规 pip 安装所需的 C++ 编译器。
为了比较,我之前为 3.5.1 安装了 rtmidi-python,也是从上面链接中提供的足够的 .whl 中安装的,并且该命令运行得非常好。
如果缺少任何必要的信息,请随时询问。非常感谢,如果答案是评论,我不会赞成。
【问题讨论】:
标签: python-3.4 typeerror python-wheel