Python 使用pip和源代码安装xlwings在ubuntu vm中出现错误
NameError:未定义名称“数据文件” 进一步分析后,我发现在setup.py中,变量namererror:“data_files”是在两个if条件下定义的Python 使用pip和源代码安装xlwings在ubuntu vm中出现错误,python,pip,python-module,xlwings,Python,Pip,Python Module,Xlwings,NameError:未定义名称“数据文件” 进一步分析后,我发现在setup.py中,变量namererror:“data_files”是在两个if条件下定义的 # Dependencies if sys.platform.startswith('win'): install_requires = [] # pywin32 can't be installed (yet) with pip # This places dlls next to python.exe for st
# Dependencies
if sys.platform.startswith('win'):
install_requires = [] # pywin32 can't be installed (yet) with pip
# This places dlls next to python.exe for standard setup and in the parent folder for virtualenv
data_files = [('', ['xlwings32.dll', 'xlwings64.dll'])]
if sys.platform.startswith('darwin'):
install_requires = ['psutil >= 2.0.0', 'appscript >= 1.0.1']
data_files =[]
其他环境不也应该这样做吗?是的,可能应该这样做。github上已经有了这个问题的解决方案:目前,只支持Windows和Mac。