Tag Archives: exe

[Solved] Pyinstallerimporterror: failed to load dynlib/dll (The packaged exe can run normally, but the shortcut generated by exe cannot be started)

#Solution: The created shortcut needs to add the starting position StartIn=str(target).replace(s, "")
import winshell
import os
def create_shortcut_to_desktop():
    target = sys.argv[0]
    title = 'XX shortcut'
    s = os.path.basename(target)
    fname = os.path.splitext(s)[0]
    winshell.CreateShortcut(
        Path=os.path.join(winshell.desktop(), fname + '.lnk'),
        StartIn=str(target).replace(s, ""),
        Target=target,
        Icon=(target, 0),
        Description=title)

def delete_shortcut_from_startup():
    target = sys.argv[0]
    s = os.path.basename(target)
    fname = os.path.splitext(s)[0]
    # delfile = micpath.join(winshell.startup(), fname + '.lnk')
    delfile = os.path.join(winshell.desktop(), fname + '.lnk')
    if os.path.exists(delfile):
        winshell.delete_file(delfile)

Unity uses UMP to play RTSP stream, and displays blank after packaging exe

If the operation reports an error, if the error is that the libvlc.dll file cannot be found, it is that there is no VLC library on your computer. Download and install one. After the installation is completed, the error disappears immediately.

Download address: http://get.videolan.org/vlc/3.0.6/win64/vlc-3.0.6-win64.exe

If the EXE is still blank after packaging, enter new after packaging_ Data/Plugins/x86_ 64 folder, copy and paste the DLL file in the directory to the parent directory, that is, the same as x86_ 64 keep the folder level and solve the problem.

 

Copy and paste a copy of these DLLs to the superior, as shown in the following figure:

 

Anaconda makes. Ipynb file into. EXE file

Explain the function of static keyword and final keyword in Java in detail>>>

1. Open Anaconda prompt

# 2. Install pyinstaler (either in the default directory or in other directories)
enter the command:

pip install pyinstaller

note: if the

distributed 1.21.8 requires msgpack, which is not installed.

Msgpack needs to be installed:
the solution command is as follows:

pip install msgpack

If:

You are using pip version 10.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

the solution command is as follows:

python -m pip install --upgrade pip

# 3. Open the file ^. Ipynb in jupyter notebook

Download as. Py file and save the file in the directory (default directory or the directory selected above)

4. In the promt window, enter the command: * *

pyinstaller -F ***.py

###############################35

Pyinstaller publishes exe and pops up failed to execute script main

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

1. Press Alt + F12 in pychar to open the terminal dialog box

1.1 my project files are placed in the wxPython directory, D: learn, weather index insurance, wxPython > pyinstaller -F -w teaindex_ main.py

1.2 after running, the dist folder and build folder will be generated in the directory D: learn, weather index insurance and wxPython. My exe program is in the dist folder. Double click the EXE to pop up:

1.3 in the terminal dialog box again, run D: learn, weather index insurance, wxPython > pyinstaller -F -c teaindex_ Main.py, run exe, you can see the problem, the lack of module typedefs

You should use: pyinstaller – F – C demo.py. After packaging, click exe to execute the file. If an error is reported, it will be displayed on the console. This is, to prepare for the screenshot, because the console error is a flash

1.4 refer to online solutions

Change the packing code to:

D:\learn\Weather index insurance\wxpython> pyinstaller -F -c teaindex_ main.py –hidden-import sklearn.neighbors.typedefs

The problem is solved! The executable file is generated successfully

1.5 generate the program with icon D: learn, weather index insurance, wxPython > pyinstaller -F -w -i sunny.ico teaindex_ main.py –hidden-import sklearn.neighbors.typedefs

1.6 can find existing pyqt5 plugin directories when packaging. The specific screenshot is as follows

Solution:

Search pyqt5 with everything, find the pyqt5 folder under the path of/library/plugins, and copy the DLL Dynamic Library pyqt5qmlplugin.dll

According to the path of the error prompt, create a new folder one by one, and form the directory C:: (qt5b) QT_ 1524647842210\_ h_ Env library plugins, copy the DLL dynamic library just copied in

1.7 in addition to the above module, no module named ‘sklearn. Utils_ cython_ Blas’, add this module to the end, as shown below

pyinstaller -F -w teaindex_ main.py –hidden-import sklearn.neighbors.typedefs –hidden-import sklearn.utils._ cython_ blas