Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/333.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用pip和源代码安装xlwings在ubuntu vm中出现错误_Python_Pip_Python Module_Xlwings - Fatal编程技术网

Python 使用pip和源代码安装xlwings在ubuntu vm中出现错误

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

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 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。