试图让 py2exe 为我编译一个使用 fiona 的脚本。
我使用的软件包:
import os
import fiona
import sys
from PyQt5.QtGui import QIcon
from PyQt5 import QtCore, QtGui
from PyQt5.QtWidgets import *
然后我最终得到以下错误:
D:/Temp/project/python setup.py py2exe
Traceback (most recent call last):
File "setup.py", line 9, in <module>
"excludes": ['bz2']
File "C:\Anaconda\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Anaconda\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Anaconda\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda\lib\site-packages\py2exe\build_exe.py", line 243, in run
self._run()
File "C:\Anaconda\lib\site-packages\py2exe\build_exe.py", line 296, in _run
self.find_needed_modules(mf, required_files, required_modules)
File "C:\Anaconda\lib\site-packages\py2exe\build_exe.py", line 1333, in find_needed_modules
os.path.walk(path, visit, packages)
File "C:\Anaconda\lib\ntpath.py", line 266, in walk
names = os.listdir(top)
TypeError: coercing to Unicode: need string or buffer, NoneType found
干杯