-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using python-vlc on Linux #4506
Comments
Hello, did you figure out a solution for this? I'm using VLC in my Tkinter app but haven't got to the pyinstaller part yet. Kinda worried I'm gonna run into this same situation. Thanks |
No, I still don't know what I'm missing. I'm currently trying Edit: I can't seem to figure pyqtdeploy out so I'm still stuck with this... |
I'm just about finished up with my VLC Python project, I'm gonna see if I can find a solution to this. Give me a few days and I'll report back. |
Any luck, @ScamCast? |
@marioortizmanero , I'm having a very similar problem: after packaging with pyinstaller an application that relies on python-vlc, I end up with error
same as you. I found your issue report and bookmarked it in hope of some solution, but finally found a solution myself. Environment: To figure out what was wrong, I started out by using PyInstaller to create a onefile executable of vlc.py. When running and providing the right args, that binary failed the exact same way! So, now it's clear that it's not a problem with my application, but rather with something in vlc.py. Looking around the area where it throws that exception, in the "new" method of the "Instance" class of vlc.py, there's this bit:
By specifying a VLC_PLUGIN_PATH environment variable, everything works as expected! It's an exciting workaround:
I don't know where your plugins directory is for vlc, but find it and set that environment variable. You can even do this at the beginning of your application:
I'll see if I can dig down any further and figure out why this environment var isn't set already for me, or what's wrong in vlc.py to cause it to be unable to figure out the right answer. However, I can at least work around the problem for now, and hopefully submit a pull request to vlc (or whoever it is that's got a bug) in the future. |
@aclbandit Thanks for the find. I've had my project on hold for a while that needed this fix. I'll give it a shot soon. Thanks again! |
That's an awesome fix @aclbandit! Thanks for sharing it on here and dedicating it some time. I will try it soon and report back, too. Update: your workaround worked for me. It has to be run whenever the app starts, so it's a bit of a dirty hack. But for now it works so it's enough for me. Should this be reported to |
@marioortizmanero , I wouldn't go so far as to call it a 'fix' -- definitely a workaround at best. Since things like this, when built via pyinstaller, ought to 'just work,' there's a bug someplace that needs reported, fixed, etc. Just need the time to dedicate to tracking it down... But anyway, for both of you, you're welcome. I hope it helps you. |
Sorry this issue didn't get attention sooner. PyInstaller needs a runtime hook for vlc it appears. Surprisingly there's nil documentation covering how to write them. I'll get back to you soon with more info! |
Made a new little discovery today that is sort of related to this issue and thought I'd share it. Figured out how to build the windows exe file without having to include the plugins folder and all the DLL's. All that is required is you have VLC installed. For some reason, there is an issue when the DLL's are imported in vlc.py
so it should look like this:
Not sure if it would be better to add it at the very beginning of the find_lib() function, but this is just what works in my situation. Now here's how my spec file looks like: windows.spec
Build the file: After opening vlc_test.exe, it loads with no issues. Here is the python file that I was using for test purposes: Hopefully this helps someone out. Update:
Update 2: My fix for this was accepted |
Fix looks good. I am also facing this issue but could not resolve it. I tried adding the windll.kernel32.SetDllDirectoryW(None) before import vlc but it didn't work. :(. I am not sure what happened. |
@Sumit1673 can I see what your spec looks like? |
@ScamCast Thank you for your time. I solved the missing libvlc.dll error by changing the installed VLC from 32bit to 64 bit. It started working normally using PyCharm IDE. Now, when I try to run it as a .exe I am facing a new error. Below is the image attached. |
@ScamCast Here is my spec file: block_cipher = None a = Analysis(['controller.py'], UPDATE: Here is my script which works: from ctypes import windll
This code works only if I add the first two lines. However, my actual application does not run whatever I do. The second script is below: from ctypes import windll import vlcimport os from google.cloud import speech os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "key23.json" class BackendModel:
if name == "main": |
I have a three +1 step solution for this problem:Working with pyinstaller onefile "exe" like a charm
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except AttributeError:
base_path = os.path.abspath(".")
# Python 3.8 things:
with os.add_dll_directory(os.path.join(base_path, "VLC")):
import vlc +1. Don't forget to add "VLC" folder to .spec file, like this:
I think this will helpful for You on Linux side. In my best of opinion def resource_path(relative_path):
if (myos == 'Windows'):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except AttributeError:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
elif (myos == 'Darwin') or (myos == 'Linux') :
""" Get absolute path to resource, works for dev and for PyInstaller """
base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
# base_path = os.path.dirname(os.path.abspath(__file__))
return os.path.join(base_path, relative_path) |
@MateKristof this is good! We can figure out a solution from this. |
With the minimal file as testscript.py and the spec file as specfile.py, I ran the following command and it returned the following output in terminal. This issue and traceback reported in this issue cannot be reproduced in the develop branch of Pyinstaller 4.2 (pyinstaller) riz@riz-desktop:~/Desktop/vlc$ pyinstaller --log-level DEBUG testscript.py specfile.py
18 INFO: PyInstaller: 5.0.dev0
18 INFO: Python: 3.8.5
24 INFO: Platform: Linux-5.8.0-41-generic-x86_64-with-glibc2.29
25 INFO: wrote /home/riz/Desktop/vlc/testscript.spec
25 DEBUG: Testing for UPX ...
25 INFO: UPX is not available.
26 DEBUG: script: /home/riz/Desktop/vlc/testscript.py
26 DEBUG: script: /home/riz/Desktop/vlc/specfile.py
26 INFO: Extending PYTHONPATH with paths
['/home/riz/Desktop/vlc', '/home/riz/Desktop/vlc', '/home/riz/Desktop/vlc']
30 INFO: checking Analysis
30 INFO: Building Analysis because Analysis-00.toc is non existent
30 INFO: Initializing module dependency graph...
31 INFO: Caching module graph hooks...
33 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
34 INFO: Analyzing base_library.zip ...
34 DEBUG: Collecting submodules for collections
59 DEBUG: collect_submodules - Found submodules: {'collections', 'collections.abc'}
59 DEBUG: Collecting submodules for encodings
81 DEBUG: collect_submodules - Found submodules: {'encodings.unicode_escape', 'encodings.cp424', 'encodings.ptcp154', 'encodings.cp1255', 'encodings.cp1253', 'encodings.iso8859_2', 'encodings.cp855', 'encodings.cp866', 'encodings.cp1125', 'encodings.raw_unicode_escape', 'encodings.euc_jis_2004', 'encodings.mac_latin2', 'encodings.johab', 'encodings.iso8859_9', 'encodings.mac_farsi', 'encodings.iso8859_13', 'encodings.mac_cyrillic', 'encodings.big5hkscs', 'encodings.cp875', 'encodings.koi8_u', 'encodings.hp_roman8', 'encodings', 'encodings.cp856', 'encodings.iso8859_15', 'encodings.mac_croatian', 'encodings.shift_jis', 'encodings.iso2022_jp', 'encodings.aliases', 'encodings.iso8859_16', 'encodings.mac_turkish', 'encodings.cp437', 'encodings.undefined', 'encodings.cp1252', 'encodings.cp775', 'encodings.cp865', 'encodings.iso8859_1', 'encodings.euc_kr', 'encodings.base64_codec', 'encodings.ascii', 'encodings.mac_roman', 'encodings.oem', 'encodings.cp949', 'encodings.iso8859_6', 'encodings.utf_8', 'encodings.hz', 'encodings.iso8859_14', 'encodings.cp864', 'encodings.iso2022_kr', 'encodings.koi8_t', 'encodings.mac_arabic', 'encodings.quopri_codec', 'encodings.punycode', 'encodings.bz2_codec', 'encodings.rot_13', 'encodings.cp737', 'encodings.zlib_codec', 'encodings.iso8859_4', 'encodings.cp1006', 'encodings.cp273', 'encodings.iso2022_jp_ext', 'encodings.kz1048', 'encodings.cp1256', 'encodings.iso2022_jp_3', 'encodings.koi8_r', 'encodings.mac_centeuro', 'encodings.cp861', 'encodings.cp1257', 'encodings.big5', 'encodings.iso8859_5', 'encodings.utf_16_be', 'encodings.cp1251', 'encodings.cp850', 'encodings.gb2312', 'encodings.iso2022_jp_1', 'encodings.shift_jis_2004', 'encodings.cp500', 'encodings.cp857', 'encodings.utf_32', 'encodings.cp950', 'encodings.charmap', 'encodings.utf_32_le', 'encodings.tis_620', 'encodings.iso8859_11', 'encodings.cp037', 'encodings.mac_romanian', 'encodings.mac_iceland', 'encodings.shift_jisx0213', 'encodings.cp858', 'encodings.idna', 'encodings.cp932', 'encodings.cp874', 'encodings.cp1258', 'encodings.uu_codec', 'encodings.cp862', 'encodings.cp852', 'encodings.cp1254', 'encodings.iso8859_7', 'encodings.latin_1', 'encodings.cp863', 'encodings.iso2022_jp_2', 'encodings.utf_8_sig', 'encodings.utf_7', 'encodings.utf_16', 'encodings.utf_16_le', 'encodings.hex_codec', 'encodings.iso8859_3', 'encodings.mbcs', 'encodings.euc_jisx0213', 'encodings.cp869', 'encodings.cp720', 'encodings.mac_greek', 'encodings.euc_jp', 'encodings.palmos', 'encodings.cp1140', 'encodings.cp1026', 'encodings.cp1250', 'encodings.gbk', 'encodings.utf_32_be', 'encodings.iso2022_jp_2004', 'encodings.gb18030', 'encodings.iso8859_10', 'encodings.cp860', 'encodings.iso8859_8'}
1335 INFO: Processing pre-find module path hook distutils from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'.
1335 INFO: distutils: retargeting to non-venv dir '/usr/lib/python3.8'
2605 INFO: Caching module dependency graph...
2646 DEBUG: Adding python files to base_library.zip
2659 INFO: running Analysis Analysis-00.toc
2659 DEBUG: Analyzing /usr/bin/python3.8
2667 DEBUG: Skipping libpthread.so.0 dependency of python3.8
2667 DEBUG: Skipping libdl.so.2 dependency of python3.8
2667 DEBUG: Skipping libc.so.6 dependency of python3.8
2667 DEBUG: Adding libexpat.so.1 dependency of python3.8 from /lib/x86_64-linux-gnu/libexpat.so.1
2667 DEBUG: Skipping libm.so.6 dependency of python3.8
2667 DEBUG: Adding libz.so.1 dependency of python3.8 from /lib/x86_64-linux-gnu/libz.so.1
2667 DEBUG: Skipping libutil.so.1 dependency of python3.8
2667 DEBUG: Analyzing /lib/x86_64-linux-gnu/libexpat.so.1
2673 DEBUG: Skipping libc.so.6 dependency of libexpat.so.1
2673 DEBUG: Analyzing /lib/x86_64-linux-gnu/libz.so.1
2681 DEBUG: Skipping libc.so.6 dependency of libz.so.1
2681 INFO: Analyzing /home/riz/Desktop/vlc/testscript.py
2683 INFO: Analyzing /home/riz/Desktop/vlc/specfile.py
2684 DEBUG: Hidden import 'codecs' already found
2684 INFO: Processing module hooks...
2684 INFO: Loading module hook 'hook-_tkinter.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2692 DEBUG: Skipping libpthread.so.0 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Skipping libm.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Adding libfontconfig.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libfontconfig.so.1
2692 DEBUG: Adding libX11.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libX11.so.6
2692 DEBUG: Adding libbsd.so.0 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libbsd.so.0
2692 DEBUG: Adding libXdmcp.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXdmcp.so.6
2692 DEBUG: Adding libXrender.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXrender.so.1
2692 DEBUG: Adding libBLT.2.5.so.8.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/libBLT.2.5.so.8.6
2692 DEBUG: Skipping libxcb.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Adding libXss.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXss.so.1
2692 DEBUG: Adding libtcl8.6.so dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libtcl8.6.so
2692 DEBUG: Adding libXau.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXau.so.6
2692 DEBUG: Adding libfreetype.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libfreetype.so.6
2692 DEBUG: Adding libuuid.so.1 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libuuid.so.1
2692 DEBUG: Adding libXft.so.2 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXft.so.2
2692 DEBUG: Adding libtk8.6.so dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libtk8.6.so
2692 DEBUG: Skipping libdl.so.2 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Skipping libc.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so
2692 DEBUG: Adding libpng16.so.16 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libpng16.so.16
2692 DEBUG: Adding libXext.so.6 dependency of _tkinter.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libXext.so.6
2746 INFO: checking Tree
2746 INFO: Building Tree because Tree-00.toc is non existent
2746 INFO: Building Tree Tree-00.toc
2751 INFO: checking Tree
2752 INFO: Building Tree because Tree-01.toc is non existent
2752 INFO: Building Tree Tree-01.toc
2779 WARNING: Tcl modules directory /usr/share/tcltk/tcl8.6/../tcl8 does not exist.
2780 INFO: Loading module hook 'hook-lib2to3.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2780 DEBUG: Collecting data files for lib2to3
2798 DEBUG: collect_data_files - Found files: [('/usr/lib/python3.8/lib2to3/PatternGrammar.txt', 'lib2to3'), ('/usr/lib/python3.8/lib2to3/Grammar.txt', 'lib2to3')]
2798 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2799 INFO: Loading module hook 'hook-difflib.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2799 INFO: Excluding import of doctest from module difflib
2799 INFO: Loading module hook 'hook-heapq.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2800 INFO: Excluding import of doctest from module heapq
2800 INFO: Loading module hook 'hook-sysconfig.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2804 INFO: Loading module hook 'hook-xml.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2829 INFO: Loading module hook 'hook-multiprocessing.util.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2830 INFO: Excluding import of test from module multiprocessing.util
2830 INFO: Excluding import of test.support from module multiprocessing.util
2830 INFO: Loading module hook 'hook-distutils.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2830 INFO: Loading module hook 'hook-encodings.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2830 DEBUG: Collecting submodules for encodings
2857 DEBUG: collect_submodules - Found submodules: {'encodings.unicode_escape', 'encodings.cp424', 'encodings.ptcp154', 'encodings.cp1255', 'encodings.cp1253', 'encodings.iso8859_2', 'encodings.cp855', 'encodings.cp866', 'encodings.cp1125', 'encodings.raw_unicode_escape', 'encodings.euc_jis_2004', 'encodings.mac_latin2', 'encodings.johab', 'encodings.iso8859_9', 'encodings.mac_farsi', 'encodings.iso8859_13', 'encodings.mac_cyrillic', 'encodings.big5hkscs', 'encodings.cp875', 'encodings.koi8_u', 'encodings.hp_roman8', 'encodings', 'encodings.cp856', 'encodings.iso8859_15', 'encodings.mac_croatian', 'encodings.shift_jis', 'encodings.iso2022_jp', 'encodings.aliases', 'encodings.iso8859_16', 'encodings.mac_turkish', 'encodings.cp437', 'encodings.undefined', 'encodings.cp1252', 'encodings.cp775', 'encodings.cp865', 'encodings.iso8859_1', 'encodings.euc_kr', 'encodings.base64_codec', 'encodings.ascii', 'encodings.mac_roman', 'encodings.oem', 'encodings.cp949', 'encodings.iso8859_6', 'encodings.utf_8', 'encodings.hz', 'encodings.iso8859_14', 'encodings.cp864', 'encodings.iso2022_kr', 'encodings.koi8_t', 'encodings.mac_arabic', 'encodings.quopri_codec', 'encodings.punycode', 'encodings.bz2_codec', 'encodings.rot_13', 'encodings.cp737', 'encodings.zlib_codec', 'encodings.iso8859_4', 'encodings.cp1006', 'encodings.cp273', 'encodings.iso2022_jp_ext', 'encodings.kz1048', 'encodings.cp1256', 'encodings.iso2022_jp_3', 'encodings.koi8_r', 'encodings.mac_centeuro', 'encodings.cp861', 'encodings.cp1257', 'encodings.big5', 'encodings.iso8859_5', 'encodings.utf_16_be', 'encodings.cp1251', 'encodings.cp850', 'encodings.gb2312', 'encodings.iso2022_jp_1', 'encodings.shift_jis_2004', 'encodings.cp500', 'encodings.cp857', 'encodings.utf_32', 'encodings.cp950', 'encodings.charmap', 'encodings.utf_32_le', 'encodings.tis_620', 'encodings.iso8859_11', 'encodings.cp037', 'encodings.mac_romanian', 'encodings.mac_iceland', 'encodings.shift_jisx0213', 'encodings.cp858', 'encodings.idna', 'encodings.cp932', 'encodings.cp874', 'encodings.cp1258', 'encodings.uu_codec', 'encodings.cp862', 'encodings.cp852', 'encodings.cp1254', 'encodings.iso8859_7', 'encodings.latin_1', 'encodings.cp863', 'encodings.iso2022_jp_2', 'encodings.utf_8_sig', 'encodings.utf_7', 'encodings.utf_16', 'encodings.utf_16_le', 'encodings.hex_codec', 'encodings.iso8859_3', 'encodings.mbcs', 'encodings.euc_jisx0213', 'encodings.cp869', 'encodings.cp720', 'encodings.mac_greek', 'encodings.euc_jp', 'encodings.palmos', 'encodings.cp1140', 'encodings.cp1026', 'encodings.cp1250', 'encodings.gbk', 'encodings.utf_32_be', 'encodings.iso2022_jp_2004', 'encodings.gb18030', 'encodings.iso8859_10', 'encodings.cp860', 'encodings.iso8859_8'}
2862 INFO: Loading module hook 'hook-pickle.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2864 INFO: Excluding import of argparse from module pickle
2864 INFO: Loading module hook 'hook-distutils.util.py' from '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks'...
2865 INFO: Excluding import of lib2to3.refactor from module distutils.util
2871 DEBUG: Looking for egg data files...
2871 INFO: Looking for ctypes DLLs
2871 DEBUG: Scanning test.support for shared libraries or dlls
2888 DEBUG: Scanning multiprocessing.sharedctypes for shared libraries or dlls
2889 INFO: Analyzing run-time hooks ...
2891 INFO: Including run-time hook '/home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py'
2895 INFO: Looking for dynamic libraries
2895 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Skipping libc.so.6 dependency of _posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Skipping libpthread.so.0 dependency of _posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Skipping librt.so.1 dependency of _posixshmem.cpython-38-x86_64-linux-gnu.so
2902 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_multiprocessing.cpython-38-x86_64-linux-gnu.so
2909 DEBUG: Skipping libc.so.6 dependency of _multiprocessing.cpython-38-x86_64-linux-gnu.so
2909 DEBUG: Skipping libpthread.so.0 dependency of _multiprocessing.cpython-38-x86_64-linux-gnu.so
2909 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Skipping libpthread.so.0 dependency of _ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Skipping libdl.so.2 dependency of _ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Adding libssl.so.1.1 dependency of _ssl.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libssl.so.1.1
2914 DEBUG: Skipping libc.so.6 dependency of _ssl.cpython-38-x86_64-linux-gnu.so
2914 DEBUG: Adding libcrypto.so.1.1 dependency of _ssl.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libcrypto.so.1.1
2914 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_asyncio.cpython-38-x86_64-linux-gnu.so
2919 DEBUG: Skipping libc.so.6 dependency of _asyncio.cpython-38-x86_64-linux-gnu.so
2920 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_contextvars.cpython-38-x86_64-linux-gnu.so
2925 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_queue.cpython-38-x86_64-linux-gnu.so
2931 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/mmap.cpython-38-x86_64-linux-gnu.so
2938 DEBUG: Skipping libc.so.6 dependency of mmap.cpython-38-x86_64-linux-gnu.so
2938 DEBUG: Skipping libpthread.so.0 dependency of mmap.cpython-38-x86_64-linux-gnu.so
2938 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/termios.cpython-38-x86_64-linux-gnu.so
2944 DEBUG: Skipping libc.so.6 dependency of termios.cpython-38-x86_64-linux-gnu.so
2944 DEBUG: Skipping libpthread.so.0 dependency of termios.cpython-38-x86_64-linux-gnu.so
2944 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Skipping libc.so.6 dependency of _decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Skipping libpthread.so.0 dependency of _decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Adding libmpdec.so.2 dependency of _decimal.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libmpdec.so.2
2950 DEBUG: Skipping libm.so.6 dependency of _decimal.cpython-38-x86_64-linux-gnu.so
2950 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/readline.cpython-38-x86_64-linux-gnu.so
2957 DEBUG: Skipping libc.so.6 dependency of readline.cpython-38-x86_64-linux-gnu.so
2957 DEBUG: Adding libreadline.so.8 dependency of readline.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libreadline.so.8
2957 DEBUG: Skipping libpthread.so.0 dependency of readline.cpython-38-x86_64-linux-gnu.so
2957 DEBUG: Adding libtinfo.so.6 dependency of readline.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libtinfo.so.6
2957 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_opcode.cpython-38-x86_64-linux-gnu.so
2963 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Skipping libc.so.6 dependency of _hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Skipping libpthread.so.0 dependency of _hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Skipping libdl.so.2 dependency of _hashlib.cpython-38-x86_64-linux-gnu.so
2969 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/resource.cpython-38-x86_64-linux-gnu.so
2976 DEBUG: Skipping libc.so.6 dependency of resource.cpython-38-x86_64-linux-gnu.so
2976 DEBUG: Skipping libpthread.so.0 dependency of resource.cpython-38-x86_64-linux-gnu.so
2976 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_lzma.cpython-38-x86_64-linux-gnu.so
2983 DEBUG: Adding liblzma.so.5 dependency of _lzma.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/liblzma.so.5
2983 DEBUG: Skipping libc.so.6 dependency of _lzma.cpython-38-x86_64-linux-gnu.so
2983 DEBUG: Skipping libpthread.so.0 dependency of _lzma.cpython-38-x86_64-linux-gnu.so
2983 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_bz2.cpython-38-x86_64-linux-gnu.so
2991 DEBUG: Adding libbz2.so.1.0 dependency of _bz2.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libbz2.so.1.0
2991 DEBUG: Skipping libc.so.6 dependency of _bz2.cpython-38-x86_64-linux-gnu.so
2991 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Skipping libc.so.6 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Skipping libpthread.so.0 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Adding libffi.so.7 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so from /lib/x86_64-linux-gnu/libffi.so.7
2999 DEBUG: Skipping libdl.so.2 dependency of _ctypes.cpython-38-x86_64-linux-gnu.so
2999 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_multibytecodec.cpython-38-x86_64-linux-gnu.so
3005 DEBUG: Skipping libc.so.6 dependency of _multibytecodec.cpython-38-x86_64-linux-gnu.so
3005 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_cn.cpython-38-x86_64-linux-gnu.so
3009 DEBUG: Skipping libc.so.6 dependency of _codecs_cn.cpython-38-x86_64-linux-gnu.so
3010 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_iso2022.cpython-38-x86_64-linux-gnu.so
3015 DEBUG: Skipping libc.so.6 dependency of _codecs_iso2022.cpython-38-x86_64-linux-gnu.so
3015 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_jp.cpython-38-x86_64-linux-gnu.so
3022 DEBUG: Skipping libc.so.6 dependency of _codecs_jp.cpython-38-x86_64-linux-gnu.so
3022 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_tw.cpython-38-x86_64-linux-gnu.so
3029 DEBUG: Skipping libc.so.6 dependency of _codecs_tw.cpython-38-x86_64-linux-gnu.so
3029 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_kr.cpython-38-x86_64-linux-gnu.so
3035 DEBUG: Skipping libc.so.6 dependency of _codecs_kr.cpython-38-x86_64-linux-gnu.so
3036 DEBUG: Analyzing /usr/lib/python3.8/lib-dynload/_codecs_hk.cpython-38-x86_64-linux-gnu.so
3042 DEBUG: Skipping libc.so.6 dependency of _codecs_hk.cpython-38-x86_64-linux-gnu.so
3042 DEBUG: Analyzing /lib/x86_64-linux-gnu/libssl.so.1.1
3047 DEBUG: Skipping libc.so.6 dependency of libssl.so.1.1
3047 DEBUG: Skipping libpthread.so.0 dependency of libssl.so.1.1
3047 DEBUG: Skipping libdl.so.2 dependency of libssl.so.1.1
3047 DEBUG: Analyzing /lib/x86_64-linux-gnu/libcrypto.so.1.1
3053 DEBUG: Skipping libc.so.6 dependency of libcrypto.so.1.1
3053 DEBUG: Skipping libpthread.so.0 dependency of libcrypto.so.1.1
3053 DEBUG: Skipping libdl.so.2 dependency of libcrypto.so.1.1
3053 DEBUG: Analyzing /lib/x86_64-linux-gnu/libmpdec.so.2
3060 DEBUG: Skipping libc.so.6 dependency of libmpdec.so.2
3060 DEBUG: Skipping libm.so.6 dependency of libmpdec.so.2
3060 DEBUG: Analyzing /lib/x86_64-linux-gnu/libreadline.so.8
3066 DEBUG: Skipping libc.so.6 dependency of libreadline.so.8
3066 DEBUG: Analyzing /lib/x86_64-linux-gnu/libtinfo.so.6
3073 DEBUG: Skipping libc.so.6 dependency of libtinfo.so.6
3073 DEBUG: Analyzing /lib/x86_64-linux-gnu/liblzma.so.5
3079 DEBUG: Skipping libc.so.6 dependency of liblzma.so.5
3079 DEBUG: Skipping libpthread.so.0 dependency of liblzma.so.5
3079 DEBUG: Analyzing /lib/x86_64-linux-gnu/libbz2.so.1.0
3086 DEBUG: Skipping libc.so.6 dependency of libbz2.so.1.0
3086 DEBUG: Analyzing /lib/x86_64-linux-gnu/libffi.so.7
3093 DEBUG: Skipping libc.so.6 dependency of libffi.so.7
3093 INFO: Looking for eggs
3093 INFO: Python library not in binary dependencies. Doing additional searching...
3118 DEBUG: Adding Python library to binary dependencies
3118 INFO: Using Python library /lib/x86_64-linux-gnu/libpython3.8.so.1.0
3120 INFO: Warnings written to /home/riz/Desktop/vlc/build/testscript/warn-testscript.txt
3133 INFO: Graph cross-reference written to /home/riz/Desktop/vlc/build/testscript/xref-testscript.html
3139 INFO: Graph drawing written to /home/riz/Desktop/vlc/build/testscript/graph-testscript.dot
3142 DEBUG: compiled /usr/lib/python3.8/struct.py
3142 INFO: checking PYZ
3142 INFO: Building PYZ because PYZ-00.toc is non existent
3142 INFO: Building PYZ (ZlibArchive) /home/riz/Desktop/vlc/build/testscript/PYZ-00.pyz
3385 INFO: Building PYZ (ZlibArchive) /home/riz/Desktop/vlc/build/testscript/PYZ-00.pyz completed successfully.
3387 INFO: checking PKG
3387 INFO: Building PKG because PKG-00.toc is non existent
3387 INFO: Building PKG (CArchive) PKG-00.pkg
3416 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py
3416 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py
3417 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py
3417 DEBUG: Compiling /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py
3417 DEBUG: Compiling /home/riz/Desktop/vlc/testscript.py
3417 DEBUG: Compiling /home/riz/Desktop/vlc/testscript.py
3418 DEBUG: Compiling /home/riz/Desktop/vlc/specfile.py
3418 DEBUG: Compiling /home/riz/Desktop/vlc/specfile.py
3420 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
3420 INFO: Bootloader /home/riz/.virtualenvs/pyinstaller/lib/python3.8/site-packages/PyInstaller/bootloader/Linux-64bit/run
3420 INFO: checking EXE
3420 INFO: Building EXE because EXE-00.toc is non existent
3420 INFO: Building EXE from EXE-00.toc
3420 INFO: Appending archive to ELF section in EXE /home/riz/Desktop/vlc/build/testscript/testscript
3425 DEBUG: objcopy returned 0
3425 INFO: Building EXE from EXE-00.toc completed successfully.
3426 INFO: checking COLLECT
3426 INFO: Building COLLECT because COLLECT-00.toc is non existent
3426 INFO: Building COLLECT COLLECT-00.toc
3434 INFO: Building COLLECT COLLECT-00.toc completed successfully.
(pyinstaller) riz@riz-desktop:~/Desktop/vlc$ |
I am still having this issue in the latest version of pyinstaller run from source downloaded from the repository. Has anyone found a more permanent fix? Edit: For more context, I'm building my program on Ubuntu 16.04 using python 3.8 and pyinstaller 4.2 (as mentioned, I've also tried the most current source). Everything works fine when I launch the app on that system, but when I move it over to openSUSE Tumbleweed I get
Edit 2 [Solved]: For anyone else with this issue, I resolved it by installing the latest version of VLC on Ubuntu 16.04 via the PPAs. It does not work to install VLC via snap, it must be installed with the PPAs. Now everything works when I move the binary to my oS Tumbleweed machine. |
After reading the comment from @aclbandit EDIT 28 okt 2022:
This seems to work, but only if you install VLC player from the package manager (not the flatpack one). It seems not any problem if both flatpack and the original package one are installed. EDIT 27 okt 2022: ORGINAL POST 27 okt 2022: My solution was: Thats it. Now I was able to type in terminal |
#3448 is the same issue, but specifically for Windows, which was fixed by adding libvlc and a couple more files into the binary. Another related issue is #4369.
I did make it work on Windows but I can't do it on Linux. I've tried copying into the contents from
/usr/lib/vlc
, like what was done in the Windows issue, but nothing. Also with libvlc and libvlccore, and many more.I'm using the last version of pyinstaller, python 3.7 and Ubuntu 19.04. Doesn't work on Arch Linux either.
Has anyone else faced this issue?
Minimal file:
Output: (no other hints by passing
--verbose 3
as an argument, or--debug
to pyinstaller.)Used specfile:
Warnings file:
The text was updated successfully, but these errors were encountered: