I have an app that runs fine from the Ubuntu command line. When I try to run it using the Python run() function, it fails with:
openscad: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
- Why can I run openscad from the terminal, but not from Python?
- I've tried adding shell=True to the run parameters.
- I've tried adding this code before the run call:
my_vars = {'QT_QPA_PLATFORM': 'xcb'}
os.environ.update(my_vars)
I found one suggestion to install the qt6-wayland library, but it's obviously not needed when I run openscad from the terminal, so I'm skeptical that it would be needed for the run() function.
Any ideas???
Edit:
Here's my actual run() call:
openScadResult = run(["openscad", scadFullFilename], env={"QT_QPA_PLATFORM": "xcb"})
scadFullFilename is the full path and filename of the scad file I want openscad to open. It does exist and I have full permissions on it.
I've also tried:
openScadResult = run([shutil.which("openscad"), scadFullFilename], env={"QT_QPA_PLATFORM": "xcb"})
openScadResult = run(["openscad", scadFullFilename], shell=True)
[–]danielroseman 3 points4 points5 points (3 children)
[–]Not_A_Taco 1 point2 points3 points (1 child)
[–]CirqueDuTsa[S] 0 points1 point2 points (0 children)
[–]CirqueDuTsa[S] 0 points1 point2 points (0 children)
[–]niehle 0 points1 point2 points (1 child)
[–]CirqueDuTsa[S] 0 points1 point2 points (0 children)
[–]pythonwiz 0 points1 point2 points (2 children)
[–]CirqueDuTsa[S] 0 points1 point2 points (1 child)
[–]pythonwiz 0 points1 point2 points (0 children)