相关文章推荐

Building an executable with Pyinstaller #287

@ChrisAlphabet

Description

Hi all,

I am trying to build an executable for a Python project that uses the Kvaser interface.

Running pyinstaller canbus_exerciser.py works fine and creates the executable.
But when I run the executable from a command prompt I get:

ImportError: No module named 'can.interfaces.kvaser'

which seems to suggest that the executable can't find the device driver for the Kvaser.

Using python canbus_exerciser.py works perfectly so I know that the driver has been installed properly.

A quick look at the pyinstaller docs shows that you can pass in additional binary and non-binary files.

There are a bunch of files in C:\Program Files\Kvaser\Drivers but I am not sure which ones need to be used with pyinstaller to make the Kvaser device driver work properly.

Has anyone tried to do anything similar and know which files to select?

Thanks!

 
推荐文章