0

NameError:未定义名称“data_files”

经过进一步分析,我发现在 setup.py 中,变量 NameError: '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 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 =[]

这不应该也适用于其他环境吗?

4

0 回答 0