当我从 xlwings 编译示例斐波那契作为独立版本时,执行时出现以下错误。我尝试使用include_files
cx_Freeze 安装脚本中的选项包含文件,但我不断收到错误消息。
有人知道如何解决这个问题吗?
Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
File "ioforge.py", line 10, in <module>
File "C:\Anaconda\lib\site-packages\xlwings-0.3.0-py2.7.egg\xlwings\__init__.py", line 18, in <module>
File "C:\Anaconda\lib\site-packages\xlwings-0.3.0-py2.7.egg\xlwings\_xlwindows.py", line 9, in <module>
WindowsError: [Error 123] Syntaxe du nom de fichier, de répertoire ou de volume incorrecte: ''
问题所在的行如下:
# Hack to find pythoncom.dll - needed for some distribution/setups
# E.g. if python is started with the full path outside of the python path, then it almost certainly fails
cwd = os.getcwd()
os.chdir(sys.exec_prefix)
import win32api
os.chdir(cwd)