0
因此,我有一个C++类,我为它制作了Python包装,并且为了在python中使用它而创建了一个setup.py文件来编译它。当我尝试运行python setup.py安装我收到以下错误:为什么我的setup.py脚本会出现这个错误?
lipo: can't create output file: build/temp.macosx-10.5-fat3-2.7/../tools/transport-stream/TransportStreamPacket_py.o (No such file or directory)
error: command 'gcc-4.0' failed with exit status 1
我不认为这个问题是与正编译的文件,我想我一定要建立setup.py错误。这里是我的setup.py文件是什么样子:
from distutils.core import setup, Extension
module1 = Extension('CL_TransportStreamPacket_py',
sources = ['../tools/transport-stream/TransportStreamPacket_py.cpp'],
include_dirs = ['.',
'../common',
'../tools/transport-stream'],
library_dirs = ['common',
'../tools/transport-stream'],
libraries = ['Common',
'TransportStream']
)
setup (name = 'CL_TransportStreamPacket_py',
version = '1.0',
description = 'This is the transport stream packet parser',
ext_modules = [module1])
您是否检查文件是否存在于错误消息指示的位置?如果没有,目录是否存在? – 2010-07-22 21:29:24