尝试在Windows / Linux Ubuntu上安装audiostream https://github.com/kivy/audiostream,但收到以下错误..有人知道吗?
在使用以下方式安装的Windows上:
D:\Programming\Installers\python\Programming_Related_installers\Python re
lated Installer\audiostream-master\audiostream-master>C:\Kivy-1.8.0-py2.7-win32\
Python27\python.exe setup.py install
Hello i am from site pakages
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\audiostream
copying audiostream__init__.py -> build\lib.win32-2.7\audiostream
creating build\lib.win32-2.7\audiostream\sources
copying audiostream\sources__init__.py -> build\lib.win32-2.7\audiostream\sourc
es
creating build\lib.win32-2.7\audiostream\platform
copying audiostream\platform__init__.py -> build\lib.win32-2.7\audiostream\plat
form
running build_ext
cythoning audiostream\sources\thread.pyx to audiostream\sources\thread.c
building 'audiostream.sources.thread' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\audiostream
creating build\temp.win32-2.7\Release\audiostream\sources
C:\Kivy-1.8.0-py2.7-win32\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I/usr/in
clude/SDL -I. -I/usr/include/SDL -IC:\Kivy-1.8.0-py2.7-win32\Python27\include -I
C:\Kivy-1.8.0-py2.7-win32\Python27\PC -c audiostream\sources\thread.c -o build\t
emp.win32-2.7\Release\audiostream\sources\thread.o -ggdb -O2
audiostream\sources\thread.c: In function __pyx_pf_11audiostream_7sources_6thre ad_12ThreadSource___init__': audiostream\sources\thread.c:903: warning: dereferencing type-punned pointer wil l break strict-aliasing rules audiostream\sources\thread.c:903: warning: dereferencing type-punned pointer wil l break strict-aliasing rules audiostream\sources\thread.c:903: warning: dereferencing type-punned pointer wil l break strict-aliasing rules audiostream\sources\thread.c:903: warning: dereferencing type-punned pointer wil l break strict-aliasing rules audiostream\sources\thread.c: In function__Pyx_FindPy2Metaclass':
audiostream\sources\thread.c:2408: warning: dereferencing type-punned pointer wi
ll break strict-aliasing rules
audiostream\sources\thread.c: In function `__Pyx_PyObject_IsTrue':
audiostream\sources\thread.c:3268: warning: dereferencing type-punned pointer wi
ll break strict-aliasing rules
audiostream\sources\thread.c:3269: warning: dereferencing type-punned pointer wi
ll break strict-aliasing rules
writing build\temp.win32-2.7\Release\audiostream\sources\thread.def
C:\Kivy-1.8.0-py2.7-win32\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.wi
n32-2.7\Release\audiostream\sources\thread.o build\temp.win32-2.7\Release\audios
tream\sources\thread.def -LC:\Kivy-1.8.0-py2.7-win32\Python27\libs -LC:\Kivy-1.8
.0-py2.7-win32\Python27\PCbuild -lSDL -lSDL_mixer -lpython27 -lmsvcr90 -o build\
lib.win32-2.7\audiostream\sources\thread.pyd
C:\Kivy-1.8.0-py2.7-win32\MinGW\bin..\lib\gcc\mingw32\3.4.5........\mingw32
\bin\ld.exe: cannot find -lSDL
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
在Linux上:
kivy@kivy-VirtualBox:~/python_installers/audiostream-master$ sudo python setup.py install
[sudo] password for kivy:
running install
running build
running build_py
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/audiostream
copying audiostream/init.py -> build/lib.linux-i686-2.7/audiostream
creating build/lib.linux-i686-2.7/audiostream/sources
copying audiostream/sources/init.py -> build/lib.linux-i686-2.7/audiostream/sources
creating build/lib.linux-i686-2.7/audiostream/platform
copying audiostream/platform/init.py -> build/lib.linux-i686-2.7/audiostream/platform
running build_ext
skipping 'audiostream/sources/thread.c' Cython extension (up-to-date)
building 'audiostream.sources.thread' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/audiostream
creating build/temp.linux-i686-2.7/audiostream/sources
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/SDL -I. -I/usr/include/SDL -I/usr/include/python2.7 -c audiostream/sources/thread.c -o build/temp.linux-i686-2.7/audiostream/sources/thread.o -ggdb -O2
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-i686-2.7/audiostream/sources/thread.o -lSDL -lSDL_mixer -o build/lib.linux-i686-2.7/audiostream/sources/thread.so
/usr/bin/ld: cannot find -lSDL
/usr/bin/ld: cannot find -lSDL_mixer
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
kivy@kivy-VirtualBox:~/python_installers/audiostream-master$
答案 0 :(得分:1)
/ usr / bin / ld:找不到-lSDL
在Linux上:
sudo apt-get install libsdl1.2-dev