Я использую cx_freeze
для преобразования моего приложения Python в исполняемый файл Windows.Я использую пакет pandas-profiling
в одном из моих скриптов.Когда я запускаю свой exe-файл, я получаю следующую ошибку:
File "C:\Users\Ronnie\python3.6\Lib\site-packages\pandas_profiling\__init__.py", line 10, in <module>
import pandas_profiling.templates as templates
File "C:\Users\Ronnie\python3.6\Lib\site-packages\pandas_profiling\templates.py", line 64, in <module>
row_templates_dict = {'NUM': template('row_num'),
File "C:\Users\Ronnie\python3.6\Lib\site-packages\pandas_profiling\templates.py", line 60, in template
return jinja2_env.get_template(templates[template_name], globals=globals)
File "C:\Users\Ronnie\python3.6\Lib\site-packages\jinja2\environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "C:\Users\Ronnie\python3.6\Lib\site-packages\jinja2\environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "C:\Users\Ronnie\python3.6\Lib\site-packages\jinja2\loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "C:\Users\Ronnie\python3.6\Lib\site-packages\jinja2\loaders.py", line 234, in get_source
if not self.provider.has_resource(p):
File "C:\Users\Ronnie\python3.6\Lib\site-packages\pkg_resources\__init__.py", line 1396, in has_resource
return self._has(self._fn(self.module_path, resource_name))
File "C:\Users\Ronnie\python3.6\Lib\site-packages\pkg_resources\__init__.py", line 1449, in _has
"Can't perform this operation for unregistered loader type"
NotImplementedError: Can't perform this operation for unregistered loader type
И если я помещаю pandas-profiling
в тот же каталог, что и exe-файл, а затем запускаю его, я получаю следующую ошибку:
error: unrecognized arguments: --multiprocessing-fork 1448
При поиске решения ошибки многопроцессорности я обнаружил, что pandas-profiling
использует multiprocessing
в одном из своих сценариев, и в этом модуле должен быть вызов multiprocessing.freeze_support()
, но я не могу 'не могу понять, где это добавить.
Буду признателен за любую помощь.