Giter Site home page Giter Site logo

Comments (11)

htgoebel avatar htgoebel commented on August 21, 2024

This looks like not all required files are packages. Please have a look at Make sure everything is packaged correctly for tips to find out what is missing. Esp use NTstrace to find which dll is missing.

We would appreciate if you'd submit a hook for this. See https://pyinstaller.readthedocs.org/en/latest/hooks.html for more information about how to implement hooks.

from pyinstaller-hooks-contrib.

jackadam1981 avatar jackadam1981 commented on August 21, 2024

my englist is bad.
can't understand hooks.
so try get some help.

from pyinstaller-hooks-contrib.

josephalway avatar josephalway commented on August 21, 2024

Did you install the Windows 10 SDK?

I'm pretty sure I had the same issue with an executable not running on a different computer when I hadn't included the ucrt files:

Update the pathex line in your spec file to include the ucrt dlls.

x86: (32-bit windows)
pathex=['C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\ucrt\\DLLs\\x86']

x64: (64-bit windows)
pathex=['C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\ucrt\\DLLs\\x64']

from pyinstaller-hooks-contrib.

jackadam1981 avatar jackadam1981 commented on August 21, 2024

Accidentally ,I solved the problem.
pypcap need npcap and winpcap API.
different computer install npcap with winpcapAPI。
then build exe work on different computer。
my script use pyqt pypcap.
i want start gui first.
then check npcap.

but,build time, import pcap.
start exe ,check import ,so DLL load failed.
mybe some ,i try included the DLL in exe.

from pyinstaller-hooks-contrib.

arossert avatar arossert commented on August 21, 2024

Can anyone tell me if this is possible?
I'm trying to bundle a winpcap app ut cannot understand how to include the dlls.

from pyinstaller-hooks-contrib.

htgoebel avatar htgoebel commented on August 21, 2024

@arossert See above: You need to create a hook.

from pyinstaller-hooks-contrib.

arossert avatar arossert commented on August 21, 2024

@htgoebel thanks for the response but can you please point me to how can I achieve this with a hook?

From this conversation, it is hard to understand what needs to be done.
I have created some hooks to some modules but all of them was to include some modules or source files and never external DLLs, so I'm a bit confused about how to begin.

from pyinstaller-hooks-contrib.

htgoebel avatar htgoebel commented on August 21, 2024

Just read hte manual an look at other hooks. You need to add the dll as binaries.

from pyinstaller-hooks-contrib.

arossert avatar arossert commented on August 21, 2024

@htgoebel I have tried to manually copy the files that are installed from Npcap to the target PyInstaller directory but still getting the DLL error exception.
The files are Packet.lib & wpcap.lib, do you have any idea how to make it work?
This is the simple example that i'm trying to build:

import pcapy

if the target machine has no Npcao/winpcap installed it is throwing the DLL exception.

from pyinstaller-hooks-contrib.

bjones1 avatar bjones1 commented on August 21, 2024

You don't need .lib files (static libraries used to compile an application), but the .dll files.

from pyinstaller-hooks-contrib.

arossert avatar arossert commented on August 21, 2024

@bjones1 thanks, this was my mistake.
I have successfully created a hook that takes the Packet.dll & wpcap.dll from the system32 lib and includes them in the final directory but when I copied it to another machine it is not working, I'm getting this error:

pcapy.PcapError: No valid interfaces to open

If I install the winpcap/npcap library and remove the DLLs from my application directory it is working so I'm not sure that it is even possible.

It might be because I have built it on win7 and tested it on win10, is there a way to make it portable?

UPDATE:
I have tried to build on Win10 and run on another Win10 and it is still not working, I believe that the DLLs are not the only thing that is needed in order to "sniff" the network interfaces and that the winpcap/npcap libraries are doing something to make it work.

I wanted a way to include everything and not instruct the users of my application to install another library in order to use it.

If there is anything else that I can do to make it work I'm willing to spend the time testing it but currently I'm stuck.

from pyinstaller-hooks-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.