Skip to content

automatically install Pillow dependancy for currently running python instance (non flatpak only)#16

Open
y-e-r wants to merge 6 commits intoJacotheron:mainfrom
y-e-r:main
Open

automatically install Pillow dependancy for currently running python instance (non flatpak only)#16
y-e-r wants to merge 6 commits intoJacotheron:mainfrom
y-e-r:main

Conversation

@y-e-r
Copy link
Copy Markdown
Contributor

@y-e-r y-e-r commented Feb 4, 2024

I had some trouble with git... may want to squash the 6 commits with "squash and merge" option in github. but anyway:

added a simple snippet to automatically install Pillow for whatever version of python and whatever python environment is currently running. this is useful as most people have multiple python installs on their system. also this simplifies the profile installation.

It doesn't work for flatpak (linux) as the flatpak version of python does not come with the ability to install modules (pip). this can be remedied by manually adding pip to flatpak's python instance, but its kinda hacky:
tested on Fedora39 and PrusaSlicer-2.7.1+flathub.org

sudo dnf install -y python3.11
/usr/bin/python3.11 -m pip install --upgrade --user pip
sudo cp -R /home/$USER/.local/lib/python3.11/site-packages/pip /home/yer/.var/app/com.prusa3d.PrusaSlicer/data/python/lib/python3.11/site-packages/

and then running the flash print profile
I'll work on a better solution and if you accept this pull request I will update the readme to reflect my changes. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant