Comments (11)
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.
my englist is bad.
can't understand hooks.
so try get some help.
from pyinstaller-hooks-contrib.
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.
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.
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.
@arossert See above: You need to create a hook.
from pyinstaller-hooks-contrib.
@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.
Just read hte manual an look at other hooks. You need to add the dll as binaries
.
from pyinstaller-hooks-contrib.
@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.
You don't need .lib
files (static libraries used to compile an application), but the .dll
files.
from pyinstaller-hooks-contrib.
@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)
- ImportError: cannot import name '_pylon' from 'pypylon' after pyinstaller 6.3.0 HOT 2
- OpenCV missing data files in /cv2/data directory HOT 1
- sklearn dropped neighbors._typedef in version 1.0.2 HOT 1
- Add PyInstaller in 'I want to help' section HOT 2
- Falcon hook
- PyInstaller: Unable to find '/usr/sbin/neato' when adding binary and data files HOT 8
- hook-transformers fails to run due to partially initialized huggingface_hub HOT 4
- cryptography with OpenSSL 3.x HOT 18
- `gcloud-aio-*` (and probably also `gcloud-rest-*`) trigger `gcloud` hook, which fails because `gcloud` is not installed. HOT 1
- 2024.5 issue importing cryptography hook during build HOT 15
- pyarrow HOT 8
- Trying to import "isolated" from "PyInstaller" when pyinstaller version is lower than 5 HOT 1
- A problem converting a grib2 file to a netCDF file using cfgrib and xarray HOT 4
- pysintaller with scipy HOT 9
- hook-cryptography 2024.7 is incompatible with pyinstaller 4.5.1 HOT 1
- Create version tag after commiting to changelog HOT 6
- Hook for tzwhere (fork) HOT 5
- Trame suite hooks HOT 7
- MONAI package HOT 12
- FIPS mode self check error HOT 39
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyinstaller-hooks-contrib.