Pyinstaller resources.DistributionNotFound 'workalendar'
Souvik Dutta
souvik.viksou at gmail.com
Fri May 8 04:49:44 EDT 2020
Have you installed the package listed in the error in a virtual environment?
On Fri, 8 May, 2020, 2:10 pm LM FP, <lmfp.forums at gmail.com> wrote:
> Hi!
> I have imported workalendar package -together with others packages- to my
> python script, and It works fine. I compile it with Pyinstaller without
> errors, but when I run the exe file appears a warning:
> pkg_resources.DistributionNotFound: The 'workalendar' distribution was not
> found and is required by the application.
>
> I execute this: C:\Python\Python38\Scripts\pyinstaller.exe --onefile
> .\main.spec
>
> And when I execute the exe file returns:
> pkg_resources.DistributionNotFound: The 'workalendar' distribution was not
> found and is required by the application
> [5716] Failed to execute script main
>
>
> My spec file:
>
> # -*- mode: python ; coding: utf-8 -*-
>
> block_cipher = None
>
>
> a = Analysis(['main.py'],
> pathex=['C:\\Users\\user\\Downloads\\MyScript',
> 'C:\\Python\\Python38\\Lib\\site-packages\\workalendar'],
> binaries=[],
> datas=[],
> hiddenimports=['pkg_resources.py2_warn',
> 'workalendar-9.0.0.dist-info/*', 'workalendar-9.0.0.dist-info'],
> hookspath=[],
> runtime_hooks=[],
> excludes=[],
> win_no_prefer_redirects=False,
> win_private_assemblies=False,
> cipher=block_cipher,
> noarchive=False)
> pyz = PYZ(a.pure, a.zipped_data,
> cipher=block_cipher)
> exe = EXE(pyz,
> a.scripts,
> a.binaries,
> a.zipfiles,
> a.datas,
> [],
> name='main',
> debug=False,
> bootloader_ignore_signals=False,
> strip=False,
> upx=True,
> upx_exclude=[],
> runtime_tmpdir=None,
> console=True )
>
> Whats is the problem?
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list