gsohler / openscad

OpenSCAD - The Programmers Solid 3D CAD Modeller
https://www.openscad.org
Other
26 stars 6 forks source link

8.10 AppImage does not contain Python requirements #37

Open gatesphere opened 2 days ago

gatesphere commented 2 days ago

Describe the bug The 8.10 AppImage does not contain the required Python libraries to run standalone.

To Reproduce Steps to reproduce the behavior:

  1. Attempt to run the 8.10 AppImage on a Linux machine without Python 3.11 installed, and render a test .py file
  2. Observe the console output

Expected behavior An AppImage should contain all requirements for an application to run standalone.

Code reproducing the issue N/A

Screenshots N/A

Environment and Version info (please complete the following information): N/A

Library & Graphics card information N/A

Additional context This may be a good thing -- a bundled Python 3.11 inside an AppImage would have a hard (impossible?) time using any additionally installed pip packages that a user may install separately.

gsohler commented 1 day ago

Thank you for reporting the bug and your analysis. The AppImage did run in my computer as it got correct python from somewhere else. I am happy that others tell me, that its not self contained. The AppImage was created with "linuxdeploy", need to find a way to include python libraries in addition. If you have some experience, i'd be happy to know.

gsohler commented 1 day ago

AppImages can read files from the users local computer(e.g. when do file->open->Python/SCAD Design) I hope that same also applies for python libraries installed in the host computer.

rp10007 commented 20 hours ago

Another observation: I've got 3.11installed, but the console tells me:

ERROR: Python not found. Is it installed ?\

FWIW, another big python-based appimage, mu-editor, apparently relies on its own venv and pip setup to install libraries in a special space that doesn't talk to system python installations. I don't know whether that's something you want to do, or to look at for clues.

gsohler commented 20 hours ago

FYI, i created yet another test version of the App-Image with an explicit python-plugin and the result is a ridiculous huge (250MB) appimage its in http://pythonscad.org/OpenSCAD-x86_64.AppImage and of course it works for me. Not sure it works for others

On Wed, Sep 18, 2024 at 11:17 PM paul wallich @.***> wrote:

Another observation: I've got 3.11installed, but the console tells me:

ERROR: Python not found. Is it installed ?\

FWIW, another big python-based appimage, mu-editor, apparently relies on its own venv and pip setup to install libraries in a special space that doesn't talk to system python installations. I don't know whether that's something you want to do, or to look at for clues.

— Reply to this email directly, view it on GitHub https://github.com/gsohler/openscad/issues/37#issuecomment-2359421262, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCO4MWW3U4UIQ3CYKYTWH3ZXHUXJAVCNFSM6AAAAABOL3PDP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGQZDCMRWGI . You are receiving this because you commented.Message ID: @.***>

rp10007 commented 19 hours ago

OK, this is weird.

First.py is a cut-and-paste of the table example from the web page:

def foot(x,y):
    c=cube([1,1,10])
    return translate(c,[x,y,0])

def plate():
    return cube([11,11,1])

parts=[]
parts.append(translate(plate(),[0,0,10]))

for y in [0,10]:
    for x in [0,10]:
        parts.append(foot(x,y))

output(parts)

Console says:

Loaded design '/home/paul/Documents/scad/pythonscad/First.py'.
ERROR: Python not found. Is it installed ?
Execution aborted

I wonder whether there's something in the Appdir setup or the paths that's not getting rewritten properly, so that the paths still work for you but not anyone else? (Just a cursory look at linuxdeploy, so I could be completely off base...)

gsohler commented 19 hours ago

hi Paul

let me share the notes, how i create the AppImage

cd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DEXPERIMENTAL=1 -DENABLE_PYTHON=1 -DENABLE_LIBFIVE=1 .. make -j3 rm -rf ../AppDir make install DESTDIR=../AppDir cd .. export EXTRA_QT_PLUGINS=svg /home/gsohler/git/linuxdeploy-plugin-python/linuxdeploy-plugin-python.sh --appdir AppDir export PATH=/appimage/usr/local/bin:$PATH linuxdeploy --plugin qt --output appimage --appdir AppDir

linuxdeploy-plugin-python is from git clone https://github.com/niess/linuxdeploy-plugin-python.git

i realized, that the script run quite straight forward and even compiled a complete python

just my 2 cents (for the moment) need to approach next day now :)

On Thu, Sep 19, 2024 at 12:10 AM paul wallich @.***> wrote:

OK, this is weird.

First.py is a cut-and-paste of the table example from the web page:

def foot(x,y): c=cube([1,1,10]) return translate(c,[x,y,0])

def plate(): return cube([11,11,1])

parts=[] parts.append(translate(plate(),[0,0,10]))

for y in [0,10]: for x in [0,10]: parts.append(foot(x,y))

output(parts)

Console says:

Loaded design '/home/paul/Documents/scad/pythonscad/First.py'. ERROR: Python not found. Is it installed ? Execution aborted

I wonder whether there's something in the Appdir setup or the paths that's not getting rewritten properly, so that the paths still work for you but not anyone else? (Just a cursory look at linuxdeploy, so I could be completely off base...)

— Reply to this email directly, view it on GitHub https://github.com/gsohler/openscad/issues/37#issuecomment-2359491456, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCO4MXDG4MJ3I6KAMIV4WTZXH24RAVCNFSM6AAAAABOL3PDP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGQ4TCNBVGY . You are receiving this because you commented.Message ID: @.***>