Hello,Traceback (most recent call last):File "<string>", line 4, in <module>File "c:\users\mnqko\appdata\local\programs\python\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importer.py", line 389, in load_moduleexec(bytecode, module.__dict__)File "site-packages\faker\__init__.py", line 4, in <module>File "c:\users\mnqko\appdata\local\programs\python\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importer.py", line 389, in load_moduleexec(bytecode, module.__dict__)File "site-packages\faker\factory.py", line 10, in <module>File "c:\users\mnqko\appdata\local\programs\python\python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importer.py", line 389, in load_moduleexec(bytecode, module.__dict__)File "site-packages\faker\config.py", line 11, in <module>File "site-packages\faker\config.py", line 11, in <listcomp>File "importlib\__init__.py", line 126, in import_moduleImportError: No module named 'faker.providers'Autoform returned -1
Could you please give me some advice how to proceed?
Goebel Consult, Landshut
http://www.goebel-consult.de
Blog:
http://www.goebel-consult.de/blog/bestanden-iso-27001-lead-implementer
Kolumne:
http://www.cissp-gefluester.de/2011-02-fleisige-datensammler-fur-lukratives-geschaeftsmodell-gesucht
I got this working using a hook for faker. The trick is to collect both submodules and data files from faker.providers.
tree:
.
├── example.py
└── pyinstaller
├── hook-faker.py
example.py:
$ cat example.py
from faker import Faker
fake = Faker()
print fake.password(
length=3,
special_chars=False,
digits=True,
upper_case=False,
lower_case=True
)
print fake.domain_name()
pyinstaller/hook-faker.py:
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
hiddenimports = collect_submodules('faker', 'providers')
datas = collect_data_files('faker.providers', include_py_files=True)
build command:
$ pyinstaller --clean --distpath dist --name example --additional-hooks-dir pyinstaller/ example.py
run bundle:
$ ./dist/example/example
wwg
kulas.com
--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To post to this group, send email to pyins...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Thanks for the reply,
i managed to run it with py2exe