Hello, how should I proceed when packaging to include these DLL files? Please respond to me!

32 views
Skip to first unread message

Xiao Cao

unread,
Jun 23, 2025, 5:01:04 AMJun 23
to PyInstaller
Hello, after I packaged the files on my computer, the packaged folder does not contain the following DLL files. How can I include all these DLL files in the package so that it can run on a Windows 7 system? My colleague's packaged program has these files, so how can I also have them? Otherwise, it will give an error message and the computer will not be able to find these files.
df3c1a62db74c335835874248b2079fc.png

bwoodsend

unread,
Jun 23, 2025, 5:27:05 AMJun 23
to PyInstaller
If you want to build for Windows 7, you need to use Python 3.8 since that was the last Python version to support it.

Xiao Cao

unread,
Jun 23, 2025, 6:33:35 AMJun 23
to PyInstaller
我用3.8了,怎么打包这些dll呢

Subramanian Ramajayam

unread,
Jun 23, 2025, 8:10:28 AMJun 23
to pyins...@googlegroups.com

Please try this:
pyinstaller --add-binary "libs/mylib.dll;." --onefile myscript.py


On Mon, Jun 23, 2025, 2:57 PM bwoodsend <bwoo...@gmail.com> wrote:
If you want to build for Windows 7, you need to use Python 3.8 since that was the last Python version to support it.

--
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 view this discussion visit https://groups.google.com/d/msgid/pyinstaller/12b8c21a-0a1d-4f3d-a747-4e2eb931d6a9n%40googlegroups.com.

Xiao Cao

unread,
Jun 23, 2025, 9:40:46 AMJun 23
to PyInstaller

好的,谢谢你。还想多问一句,为什么我的朋友的所有命令都能打包进去这些dll呢,我不能打包进去,是因为哪里出问题了么、

Subramanian Ramajayam

unread,
Jun 23, 2025, 12:38:25 PMJun 23
to pyins...@googlegroups.com

Try to add these files to the spec file like;
a = Analysis(
    ['myscript.py'],
    binaries=[('libs/mylib.dll', '.')],
    ...
)
    ...
)


Subramanian Ramajayam

unread,
Jun 23, 2025, 1:18:46 PMJun 23
to pyins...@googlegroups.com

This is the solution by AI.one has to try.othertwise we won't know

Reply all
Reply to author
Forward
0 new messages