jezs00 / pycasso

A system to send AI generated art to an E-Paper display through a Raspberry PI unit
MIT License
70 stars 4 forks source link

ModuleNotFoundError: No module named 'piblo' #48

Open danmcpherson opened 1 year ago

danmcpherson commented 1 year ago

Thanks for the tool, looking forward to getting it running.

I think things installed correctly, however, I'm getting the following error when I try to run many functions (the API Key set, the review screen).

Traceback (most recent call last): File "/home/danmc/pycasso/examples/review_screen.py", line 8, in from piblo import config_wrapper ModuleNotFoundError: No module named 'piblo'

I've tried making some changes to my PYTHONPATH without luck. I expect it's a pretty quick fix. It's on a fresh Raspberry Pi Zero W.

Thanks again, Daniel

jezs00 commented 1 year ago

That would mean it's not finding the piblo package which should install in step 1. Have a go running bash <(curl https://raw.githubusercontent.com/jezs00/pycasso/main/setup.sh) again and using option 1 - Install/Upgrade pycasso (Full) then close the installer.

Have a look at the terminal after closing for results of the package installs and note any errors regarding install of piblo package. Try running again, and if it's still not working post any errors you have here.

danmcpherson commented 1 year ago

Thanks for reply. I did what you described, and there were no errors beyond the grpcio issue which I then applied the fix. One other note, I do have "SlowMovie" installed (and working) as well.

Install logs bash <(curl https://raw.githubusercontent.com/jezs00/pycasso/main/setup.sh) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10321 100 10321 0 0 17493 0 --:--:-- --:--:-- --:--:-- 17522 Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done git is already the newest version (1:2.30.2-1+deb11u1). libatlas-base-dev is already the newest version (3.10.3-10+rpi1). libopenjp2-7 is already the newest version (2.4.0-3). libopenjp2-7 set to manually installed. python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1). The following packages were automatically installed and are no longer required: libfuse2 raspinfo Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libjq1 libonig5 libqrencode4 qrencode xclip Suggested packages: python libxml-simple-perl ruby The following NEW packages will be installed: gnupg2 jq libjq1 libonig5 libqrencode4 pass qrencode xclip 0 upgraded, 8 newly installed, 0 to remove and 7 not upgraded. Need to get 928 kB of archives. After this operation, 1,863 kB of additional disk space will be used. Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf gnupg2 all 2.2.27-2+deb11u2 [434 kB] Get:2 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf libonig5 armhf 6.9.6-1.1 [162 kB] Get:3 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf libjq1 armhf 1.6-2.1 [129 kB] Get:4 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf jq armhf 1.6-2.1 [64.6 kB] Get:5 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf libqrencode4 armhf 4.1.1-1 [36.2 kB] Get:6 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf pass all 1.7.3-2 [39.2 kB] Get:7 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf qrencode armhf 4.1.1-1 [41.0 kB] Get:8 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf xclip armhf 0.13-2 [22.0 kB] Fetched 928 kB in 2s (451 kB/s) Selecting previously unselected package gnupg2. (Reading database ... 106727 files and directories currently installed.) Preparing to unpack .../0-gnupg2_2.2.27-2+deb11u2_all.deb ... Unpacking gnupg2 (2.2.27-2+deb11u2) ... Selecting previously unselected package libonig5:armhf. Preparing to unpack .../1-libonig5_6.9.6-1.1_armhf.deb ... Unpacking libonig5:armhf (6.9.6-1.1) ... Selecting previously unselected package libjq1:armhf. Preparing to unpack .../2-libjq1_1.6-2.1_armhf.deb ... Unpacking libjq1:armhf (1.6-2.1) ... Selecting previously unselected package jq. Preparing to unpack .../3-jq_1.6-2.1_armhf.deb ... Unpacking jq (1.6-2.1) ... Selecting previously unselected package libqrencode4:armhf. Preparing to unpack .../4-libqrencode4_4.1.1-1_armhf.deb ... Unpacking libqrencode4:armhf (4.1.1-1) ... Selecting previously unselected package pass. Preparing to unpack .../5-pass_1.7.3-2_all.deb ... Unpacking pass (1.7.3-2) ... Selecting previously unselected package qrencode. Preparing to unpack .../6-qrencode_4.1.1-1_armhf.deb ... Unpacking qrencode (4.1.1-1) ... Selecting previously unselected package xclip. Preparing to unpack .../7-xclip_0.13-2_armhf.deb ... Unpacking xclip (0.13-2) ... Setting up gnupg2 (2.2.27-2+deb11u2) ... Setting up libqrencode4:armhf (4.1.1-1) ... Setting up qrencode (4.1.1-1) ... Setting up xclip (0.13-2) ... Setting up pass (1.7.3-2) ... Setting up libonig5:armhf (6.9.6-1.1) ... Setting up libjq1:armhf (1.6-2.1) ... Setting up jq (1.6-2.1) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ... Setting up SPI SPI already enabled No Install Found - Cloning Repo Cloning into '/home/danmc/pycasso'... remote: Enumerating objects: 2490, done. remote: Counting objects: 100% (520/520), done. remote: Compressing objects: 100% (169/169), done. remote: Total 2490 (delta 299), reused 504 (delta 287), pack-reused 1970 Receiving objects: 100% (2490/2490), 6.03 MiB | 1020.00 KiB/s, done. Resolving deltas: 100% (1542/1542), done. Updating files: 100% (100/100), done. Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting git+https://github.com/jezs00/pycasso@v1.1.2 Cloning https://github.com/jezs00/pycasso (to revision v1.1.2) to /tmp/pip-req-build-uhl19dl0 Running command git clone -q https://github.com/jezs00/pycasso /tmp/pip-req-build-uhl19dl0 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting openai@ git+https://github.com/openai/openai-python.git Cloning https://github.com/openai/openai-python.git to /tmp/pip-install-vd4tbbyl/openai_65a4c0e2148c450a9222fa8ec7e02055 Running command git clone -q https://github.com/openai/openai-python.git /tmp/pip-install-vd4tbbyl/openai_65a4c0e2148c450a9222fa8ec7e02055 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting stability-sdk@ git+https://github.com/Stability-AI/stability-sdk.git Cloning https://github.com/Stability-AI/stability-sdk.git to /tmp/pip-install-vd4tbbyl/stability-sdk_0912440daa75408e83245add8bc5ecd9 Running command git clone -q https://github.com/Stability-AI/stability-sdk.git /tmp/pip-install-vd4tbbyl/stability-sdk_0912440daa75408e83245add8bc5ecd9 Running command git submodule update --init --recursive -q Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting omni-epd@ git+https://github.com/robweber/omni-epd.git#egg=omni-epd Cloning https://github.com/robweber/omni-epd.git to /tmp/pip-install-vd4tbbyl/omni-epd_8dd692f8ecb64f7c95101a2c93626bbf Running command git clone -q https://github.com/robweber/omni-epd.git /tmp/pip-install-vd4tbbyl/omni-epd_8dd692f8ecb64f7c95101a2c93626bbf Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting Keyring Downloading https://www.piwheels.org/simple/keyring/keyring-23.13.1-py3-none-any.whl (37 kB) Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from piblo==1.1.2) (1.19.5) Collecting webuiapi Downloading webuiapi-0.3.3-py3-none-any.whl (9.3 kB) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from piblo==1.1.2) (2.25.1) Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from piblo==1.1.2) (8.1.2) Collecting waveshare-epd@ git+https://github.com/waveshare/e-Paper.git#subdirectory=RaspberryPi_JetsonNano/python&egg=waveshare-epd Cloning https://github.com/waveshare/e-Paper.git to /tmp/pip-install-vd4tbbyl/waveshare-epd_20632e2f28024d46a88ebbd97be3b870 Running command git clone -q https://github.com/waveshare/e-Paper.git /tmp/pip-install-vd4tbbyl/waveshare-epd_20632e2f28024d46a88ebbd97be3b870 Collecting IT8951@ git+https://github.com/GregDMeyer/IT8951 Cloning https://github.com/GregDMeyer/IT8951 to /tmp/pip-install-vd4tbbyl/it8951_0e7baf72f0924ee3aeff63850e8bccf1 Running command git clone -q https://github.com/GregDMeyer/IT8951 /tmp/pip-install-vd4tbbyl/it8951_0e7baf72f0924ee3aeff63850e8bccf1 Collecting Pillow Downloading https://www.piwheels.org/simple/pillow/Pillow-9.4.0-cp39-cp39-linux_armv6l.whl (1.1 MB) |████████████████████████████████| 1.1 MB 218 kB/s Collecting inky[rpi]>=1.3.1 Downloading https://www.piwheels.org/simple/inky/inky-1.5.0-py3-none-any.whl (32 kB) Collecting aiohttp Downloading https://www.piwheels.org/simple/aiohttp/aiohttp-3.8.4-cp39-cp39-linux_armv6l.whl (926 kB) |████████████████████████████████| 926 kB 784 kB/s Collecting tqdm Downloading https://www.piwheels.org/simple/tqdm/tqdm-4.64.1-py2.py3-none-any.whl (78 kB) |████████████████████████████████| 78 kB 637 kB/s Collecting python-dotenv Downloading https://www.piwheels.org/simple/python-dotenv/python_dotenv-0.21.1-py3-none-any.whl (19 kB) Collecting protobuf==3.19.5 Downloading https://www.piwheels.org/simple/protobuf/protobuf-3.19.5-py2.py3-none-any.whl (162 kB) |████████████████████████████████| 162 kB 819 kB/s Collecting grpcio-tools==1.48.1 Downloading https://www.piwheels.org/simple/grpcio-tools/grpcio_tools-1.48.1-cp39-cp39-linux_armv6l.whl (34.1 MB) |████████████████████████████████| 34.1 MB 503 bytes/s Collecting grpcio==1.48.1 Downloading grpcio-1.48.1.tar.gz (22.0 MB) |████████████████████████████████| 22.0 MB 11 kB/s ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py'"'"'; file='"'"'/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6u63xjba cwd: /tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/ Complete output (13 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py", line 263, in if check_linker_need_libatomic(): File "/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py", line 219, in check_linker_need_libatomic cpp_test = subprocess.Popen( File "/usr/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1698, in _execute_child and os.path.dirname(executable) File "/usr/lib/python3.9/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not list

WARNING: Discarding https://files.pythonhosted.org/packages/e2/13/0f91c6c7eb0d934141743c7663e8808f4dc478dd0a7b0fd2a02a286c0d6d/grpcio-1.48.1.tar.gz#sha256=660217eccd2943bf23ea9a36e2a292024305aec04bf747fbcff1f5032b83610e (from https://pypi.org/simple/grpcio/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. INFO: pip is looking at multiple versions of openai to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of it8951 to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of omni-epd to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of piblo to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement grpcio==1.48.1 (from stability-sdk) ERROR: No matching distribution found for grpcio==1.48.1 ERROR: Invalid requirement: '@' ERROR: Invalid requirement: '@' pycasso install/update complete. To test, run 'python3 /home/danmc/pycasso/examples/review_screen.py' Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting grpcio Downloading https://www.piwheels.org/simple/grpcio/grpcio-1.51.1-cp39-cp39-linux_armv6l.whl (75.8 MB) |████████████████████████████████| 75.8 MB 4.4 kB/s Collecting grpcio-tools Downloading https://www.piwheels.org/simple/grpcio-tools/grpcio_tools-1.51.1-cp39-cp39-linux_armv6l.whl (33.5 MB) |████████████████████████████████| 33.5 MB 6.2 kB/s Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from grpcio-tools) (52.0.0) Collecting protobuf<5.0dev,>=4.21.6 Downloading https://www.piwheels.org/simple/protobuf/protobuf-4.22.0-cp39-cp39-linux_armv6l.whl (924 kB) |████████████████████████████████| 924 kB 876 kB/s Installing collected packages: protobuf, grpcio, grpcio-tools Successfully installed grpcio-1.51.1 grpcio-tools-1.51.1 protobuf-4.22.0 GRPCIO fix applied Traceback (most recent call last): File "/home/danmc/pycasso/scripts/set_keys.py", line 5, in from piblo.provider import StabilityProvider, DalleProvider, ProvidersConst ModuleNotFoundError: No module named 'piblo'

jezs00 commented 1 year ago

Hmm, I might need to investigate further, it seems like some of the requirements for piblo are restricting our ability to install properly. Can you also try to update/install pycasso minimally from the installer? It should be option 2 from memory, this should install piblo without stopping for problems with requirements.

On Wed, 22 Feb 2023 at 19:20, Daniel McPherson @.***> wrote:

Thanks for reply. I did what you described, and there were no errors beyond the grpcio issue which I then applied the fix.

Install logs bash <(curl https://raw.githubusercontent.com/jezs00/pycasso/main/setup.sh ) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10321 100 10321 0 0 17493 0 --:--:-- --:--:-- --:--:-- 17522 Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done git is already the newest version (1:2.30.2-1+deb11u1). libatlas-base-dev is already the newest version (3.10.3-10+rpi1). libopenjp2-7 is already the newest version (2.4.0-3). libopenjp2-7 set to manually installed. python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1). The following packages were automatically installed and are no longer required: libfuse2 raspinfo Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libjq1 libonig5 libqrencode4 qrencode xclip Suggested packages: python libxml-simple-perl ruby The following NEW packages will be installed: gnupg2 jq libjq1 libonig5 libqrencode4 pass qrencode xclip 0 upgraded, 8 newly installed, 0 to remove and 7 not upgraded. Need to get 928 kB of archives. After this operation, 1,863 kB of additional disk space will be used. Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf gnupg2 all 2.2.27-2+deb11u2 [434 kB] Get:2 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf libonig5 armhf 6.9.6-1.1 [162 kB] Get:3 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf libjq1 armhf 1.6-2.1 [129 kB] Get:4 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf jq armhf 1.6-2.1 [64.6 kB] Get:5 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf libqrencode4 armhf 4.1.1-1 [36.2 kB] Get:6 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf pass all 1.7.3-2 [39.2 kB] Get:7 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf qrencode armhf 4.1.1-1 [41.0 kB] Get:8 http://mirror.nl.leaseweb.net/raspbian/raspbian bullseye/main armhf xclip armhf 0.13-2 [22.0 kB] Fetched 928 kB in 2s (451 kB/s) Selecting previously unselected package gnupg2. (Reading database ... 106727 files and directories currently installed.) Preparing to unpack .../0-gnupg2_2.2.27-2+deb11u2_all.deb ... Unpacking gnupg2 (2.2.27-2+deb11u2) ... Selecting previously unselected package libonig5:armhf. Preparing to unpack .../1-libonig5_6.9.6-1.1_armhf.deb ... Unpacking libonig5:armhf (6.9.6-1.1) ... Selecting previously unselected package libjq1:armhf. Preparing to unpack .../2-libjq1_1.6-2.1_armhf.deb ... Unpacking libjq1:armhf (1.6-2.1) ... Selecting previously unselected package jq. Preparing to unpack .../3-jq_1.6-2.1_armhf.deb ... Unpacking jq (1.6-2.1) ... Selecting previously unselected package libqrencode4:armhf. Preparing to unpack .../4-libqrencode4_4.1.1-1_armhf.deb ... Unpacking libqrencode4:armhf (4.1.1-1) ... Selecting previously unselected package pass. Preparing to unpack .../5-pass_1.7.3-2_all.deb ... Unpacking pass (1.7.3-2) ... Selecting previously unselected package qrencode. Preparing to unpack .../6-qrencode_4.1.1-1_armhf.deb ... Unpacking qrencode (4.1.1-1) ... Selecting previously unselected package xclip. Preparing to unpack .../7-xclip_0.13-2_armhf.deb ... Unpacking xclip (0.13-2) ... Setting up gnupg2 (2.2.27-2+deb11u2) ... Setting up libqrencode4:armhf (4.1.1-1) ... Setting up qrencode (4.1.1-1) ... Setting up xclip (0.13-2) ... Setting up pass (1.7.3-2) ... Setting up libonig5:armhf (6.9.6-1.1) ... Setting up libjq1:armhf (1.6-2.1) ... Setting up jq (1.6-2.1) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ... Setting up SPI SPI already enabled No Install Found - Cloning Repo Cloning into '/home/danmc/pycasso'... remote: Enumerating objects: 2490, done. remote: Counting objects: 100% (520/520), done. remote: Compressing objects: 100% (169/169), done. remote: Total 2490 (delta 299), reused 504 (delta 287), pack-reused 1970 Receiving objects: 100% (2490/2490), 6.03 MiB | 1020.00 KiB/s, done. Resolving deltas: 100% (1542/1542), done. Updating files: 100% (100/100), done. Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting @.** Cloning https://github.com/jezs00/pycasso (to revision v1.1.2) to /tmp/pip-req-build-uhl19dl0 Running command git clone -q https://github.com/jezs00/pycasso /tmp/pip-req-build-uhl19dl0 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting openai@ git+https://github.com/openai/openai-python.git Cloning https://github.com/openai/openai-python.git to /tmp/pip-install-vd4tbbyl/openai_65a4c0e2148c450a9222fa8ec7e02055 Running command git clone -q https://github.com/openai/openai-python.git /tmp/pip-install-vd4tbbyl/openai_65a4c0e2148c450a9222fa8ec7e02055 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting stability-sdk@ git+ https://github.com/Stability-AI/stability-sdk.git Cloning https://github.com/Stability-AI/stability-sdk.git to /tmp/pip-install-vd4tbbyl/stability-sdk_0912440daa75408e83245add8bc5ecd9 Running command git clone -q https://github.com/Stability-AI/stability-sdk.git /tmp/pip-install-vd4tbbyl/stability-sdk_0912440daa75408e83245add8bc5ecd9 Running command git submodule update --init --recursive -q Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Collecting omni-epd@ git+ https://github.com/robweber/omni-epd.git#egg=omni-epd Cloning https://github.com/robweber/omni-epd.git to /tmp/pip-install-vd4tbbyl/omni-epd_8dd692f8ecb64f7c95101a2c93626bbf Running command git clone -q https://github.com/robweber/omni-epd.git /tmp/pip-install-vd4tbbyl/omni-epd_8dd692f8ecb64f7c95101a2c93626bbf Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting Keyring Downloading https://www.piwheels.org/simple/keyring/keyring-23.13.1-py3-none-any.whl (37 kB) Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from piblo==1.1.2) (1.19.5) Collecting webuiapi Downloading webuiapi-0.3.3-py3-none-any.whl (9.3 kB) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from piblo==1.1.2) (2.25.1) Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from piblo==1.1.2) (8.1.2) Collecting waveshare-epd@ git+ https://github.com/waveshare/e-Paper.git#subdirectory=RaspberryPi_JetsonNano/python&egg=waveshare-epd Cloning https://github.com/waveshare/e-Paper.git to /tmp/pip-install-vd4tbbyl/waveshare-epd_20632e2f28024d46a88ebbd97be3b870 Running command git clone -q https://github.com/waveshare/e-Paper.git /tmp/pip-install-vd4tbbyl/waveshare-epd_20632e2f28024d46a88ebbd97be3b870 Collecting IT8951@ git+https://github.com/GregDMeyer/IT8951 Cloning https://github.com/GregDMeyer/IT8951 to /tmp/pip-install-vd4tbbyl/it8951_0e7baf72f0924ee3aeff63850e8bccf1 Running command git clone -q https://github.com/GregDMeyer/IT8951 /tmp/pip-install-vd4tbbyl/it8951_0e7baf72f0924ee3aeff63850e8bccf1 Collecting Pillow Downloading https://www.piwheels.org/simple/pillow/Pillow-9.4.0-cp39-cp39-linux_armv6l.whl (1.1 MB) |████████████████████████████████| 1.1 MB 218 kB/s Collecting inky[rpi]>=1.3.1 Downloading https://www.piwheels.org/simple/inky/inky-1.5.0-py3-none-any.whl (32 kB) Collecting aiohttp Downloading https://www.piwheels.org/simple/aiohttp/aiohttp-3.8.4-cp39-cp39-linux_armv6l.whl (926 kB) |████████████████████████████████| 926 kB 784 kB/s Collecting tqdm Downloading https://www.piwheels.org/simple/tqdm/tqdm-4.64.1-py2.py3-none-any.whl (78 kB) |████████████████████████████████| 78 kB 637 kB/s Collecting python-dotenv Downloading https://www.piwheels.org/simple/python-dotenv/python_dotenv-0.21.1-py3-none-any.whl (19 kB) Collecting protobuf==3.19.5 Downloading https://www.piwheels.org/simple/protobuf/protobuf-3.19.5-py2.py3-none-any.whl (162 kB) |████████████████████████████████| 162 kB 819 kB/s Collecting grpcio-tools==1.48.1 Downloading https://www.piwheels.org/simple/grpcio-tools/grpcio_tools-1.48.1-cp39-cp39-linux_armv6l.whl (34.1 MB) |████████████████████████████████| 34.1 MB 503 bytes/s Collecting grpcio==1.48.1 Downloading grpcio-1.48.1.tar.gz (22.0 MB) |████████████████████████████████| 22.0 MB 11 kB/s ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py'"'"'; file='"'"'/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6u63xjba cwd: /tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/ Complete output (13 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py", line 263, in if check_linker_need_libatomic(): File "/tmp/pip-install-vd4tbbyl/grpcio_0ef79aec278b440bae5aa8c5ca33c98d/setup.py", line 219, in check_linker_need_libatomic cpp_test = subprocess.Popen( File "/usr/lib/python3.9/subprocess.py", line 951, in init* self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1698, in _execute_child and os.path.dirname(executable) File "/usr/lib/python3.9/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not list

WARNING: Discarding https://files.pythonhosted.org/packages/e2/13/0f91c6c7eb0d934141743c7663e8808f4dc478dd0a7b0fd2a02a286c0d6d/grpcio-1.48.1.tar.gz#sha256=660217eccd2943bf23ea9a36e2a292024305aec04bf747fbcff1f5032b83610e (from https://pypi.org/simple/grpcio/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. INFO: pip is looking at multiple versions of openai to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of it8951 to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of omni-epd to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of piblo to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement grpcio==1.48.1 (from stability-sdk) ERROR: No matching distribution found for grpcio==1.48.1 ERROR: Invalid requirement: '@' ERROR: Invalid requirement: '@' pycasso install/update complete. To test, run 'python3 /home/danmc/pycasso/examples/review_screen.py' Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting grpcio Downloading https://www.piwheels.org/simple/grpcio/grpcio-1.51.1-cp39-cp39-linux_armv6l.whl (75.8 MB) |████████████████████████████████| 75.8 MB 4.4 kB/s Collecting grpcio-tools Downloading https://www.piwheels.org/simple/grpcio-tools/grpcio_tools-1.51.1-cp39-cp39-linux_armv6l.whl (33.5 MB) |████████████████████████████████| 33.5 MB 6.2 kB/s Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from grpcio-tools) (52.0.0) Collecting protobuf<5.0dev,>=4.21.6 Downloading https://www.piwheels.org/simple/protobuf/protobuf-4.22.0-cp39-cp39-linux_armv6l.whl (924 kB) |████████████████████████████████| 924 kB 876 kB/s Installing collected packages: protobuf, grpcio, grpcio-tools Successfully installed grpcio-1.51.1 grpcio-tools-1.51.1 protobuf-4.22.0 GRPCIO fix applied Traceback (most recent call last): File "/home/danmc/pycasso/scripts/set_keys.py", line 5, in from piblo.provider import StabilityProvider, DalleProvider, ProvidersConst ModuleNotFoundError: No module named 'piblo'

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/48#issuecomment-1439604197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7GWIMXBBJ2TM43SGGTWYXD5DANCNFSM6AAAAAAVDJMC64 . You are receiving this because you commented.Message ID: @.***>

danmcpherson commented 1 year ago

Thanks again, I did that, see below.

It did install Piblo. Next I had to install Omni-EPD.

Then it worked! So, it's up and running with my bird, but I'm not able to set the API key:

Traceback (most recent call last): File "/home/danmc/pycasso/scripts/set_keys.py", line 8, in from piblo.pycasso import Pycasso File "/usr/local/lib/python3.9/dist-packages/piblo/pycasso.py", line 20, in from piblo.provider import StabilityProvider, DalleProvider, AutomaticProvider File "/usr/local/lib/python3.9/dist-packages/piblo/provider.py", line 9, in import webuiapi ModuleNotFoundError: No module named 'webuiapi'

Minimal Install: danmc@imagination2:~ $ bash <(curl https://raw.githubusercontent.com/jezs00/pycasso/main/setup.sh) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10321 100 10321 0 0 16279 0 --:--:-- --:--:-- --:--:-- 16279 Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done git is already the newest version (1:2.30.2-1+deb11u1). gnupg2 is already the newest version (2.2.27-2+deb11u2). jq is already the newest version (1.6-2.1). libatlas-base-dev is already the newest version (3.10.3-10+rpi1). libopenjp2-7 is already the newest version (2.4.0-3). pass is already the newest version (1.7.3-2). python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Setting up SPI SPI already enabled Existing Install Found - Updating Repo Already on 'main' Your branch is up to date with 'origin/main'. hint: Pulling without specifying how to reconcile divergent branches is hint: discouraged. You can squelch this message by running one of the following hint: commands sometime before your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. Already up to date. mkdir: cannot create directory ‘/home/danmc/pycasso/prompts’: File exists mkdir: cannot create directory ‘/home/danmc/pycasso/images’: File exists mkdir: cannot create directory ‘/home/danmc/pycasso/images/generated’: File exists mkdir: cannot create directory ‘/home/danmc/pycasso/images/external’: File exists Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting git+https://github.com/jezs00/pycasso@v1.2.0 Cloning https://github.com/jezs00/pycasso (to revision v1.2.0) to /tmp/pip-req-build-owj1594 Running command git clone -q https://github.com/jezs00/pycasso /tmp/pip-req-build-owj1594 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Building wheels for collected packages: piblo Building wheel for piblo (PEP 517) ... done Created wheel for piblo: filename=piblo-1.2.0-py3-none-any.whl size=36185 sha256=dc40fd54975f1000151a013c4e3f7dc8bd860b12b06e1f7eb25e651a2c6f0e11 Stored in directory: /tmp/pip-ephem-wheel-cache-03cu0bpg/wheels/cc/92/99/4f73b35457f520ef7db1a34fd7caa127525ab1b9b419628964 Successfully built piblo Installing collected packages: piblo Successfully installed piblo-1.2.0 pycasso install/update complete. To test, run 'python3 /home/danmc/pycasso/examples/review_screen.py' Traceback (most recent call last): File "/home/danmc/pycasso/scripts/set_keys.py", line 8, in from piblo.pycasso import Pycasso File "/usr/local/lib/python3.9/dist-packages/piblo/pycasso.py", line 13, in from omni_epd import displayfactory, EPDNotFoundError ModuleNotFoundError: No module named 'omni_epd'

BigDave365 commented 1 year ago

I have the same hardware and the same issue. Pycasso is not generating an error log (at least one I can find), and it does not show up in running services. If run the run.py script, it says that the module "webuiapi" is missing.

I also tried running on a Pi 3B and it all worked without a hitch....

jezs00 commented 1 year ago

That is annoying, I think what has happened is some requirements have been missed due to failures, but I can't see evidence of that in the pip log you pasted. Perhaps there's a package that doesn't work well on this hardware or we've added a package recently that is causing problems. I can probably have a better look this weekend. Otherwise, if you guys can check out requirements.txt and run 'sudo pip3 install' for each package in requirements.txt, it should help:

Let me know how you go.

On Thu, 23 Feb 2023, 7:41 pm Daniel McPherson, @.***> wrote:

Thanks again, I did that, see below.

It did install Piblo. Next I had to install Omni-EPD.

Then it worked! So, it's up and running with my bird, but I'm not able to set the API key:

Traceback (most recent call last): File "/home/danmc/pycasso/scripts/set_keys.py", line 8, in from piblo.pycasso import Pycasso File "/usr/local/lib/python3.9/dist-packages/piblo/pycasso.py", line 20, in from piblo.provider import StabilityProvider, DalleProvider, AutomaticProvider File "/usr/local/lib/python3.9/dist-packages/piblo/provider.py", line 9, in import webuiapi ModuleNotFoundError: No module named 'webuiapi'

Minimal Install: @.:~ $ bash <(curl https://raw.githubusercontent.com/jezs00/pycasso/main/setup.sh) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10321 100 10321 0 0 16279 0 --:--:-- --:--:-- --:--:-- 16279 Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done git is already the newest version (1:2.30.2-1+deb11u1). gnupg2 is already the newest version (2.2.27-2+deb11u2). jq is already the newest version (1.6-2.1). libatlas-base-dev is already the newest version (3.10.3-10+rpi1). libopenjp2-7 is already the newest version (2.4.0-3). pass is already the newest version (1.7.3-2). python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Setting up SPI SPI already enabled Existing Install Found - Updating Repo Already on 'main' Your branch is up to date with 'origin/main'. hint: Pulling without specifying how to reconcile divergent branches is hint: discouraged. You can squelch this message by running one of the following hint: commands sometime before your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. Already up to date. mkdir: cannot create directory ‘/home/danmc/pycasso/prompts’: File exists mkdir: cannot create directory ‘/home/danmc/pycasso/images’: File exists mkdir: cannot create directory ‘/home/danmc/pycasso/images/generated’: File exists mkdir: cannot create directory ‘/home/danmc/pycasso/images/external’: File exists Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting @. Cloning https://github.com/jezs00/pycasso (to revision v1.2.0) to /tmp/pip-req-build-owj1594 Running command git clone -q https://github.com/jezs00/pycasso /tmp/pip-req-build-owj1594 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... done Building wheels for collected packages: piblo Building wheel for piblo (PEP 517) ... done Created wheel for piblo: filename=piblo-1.2.0-py3-none-any.whl size=36185 sha256=dc40fd54975f1000151a013c4e3f7dc8bd860b12b06e1f7eb25e651a2c6f0e11 Stored in directory: /tmp/pip-ephem-wheel-cache-03cu0bpg/wheels/cc/92/99/4f73b35457f520ef7db1a34fd7caa127525ab1b9b419628964 Successfully built piblo Installing collected packages: piblo Successfully installed piblo-1.2.0 pycasso install/update complete. To test, run 'python3 /home/danmc/pycasso/examples/review_screen.py' Traceback (most recent call last): File "/home/danmc/pycasso/scripts/set_keys.py", line 8, in from piblo.pycasso import Pycasso File "/usr/local/lib/python3.9/dist-packages/piblo/pycasso.py", line 13, in from omni_epd import displayfactory, EPDNotFoundError ModuleNotFoundError: No module named 'omni_epd'

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/48#issuecomment-1441381819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7GMODTZWTGUTGTQQNDWY4PEFANCNFSM6AAAAAAVDJMC64 . You are receiving this because you commented.Message ID: @.***>

BigDave365 commented 1 year ago

I gave it a go. I had a few issues figuring out the syntax (not a Linux guy), but seem to have several packages missing. All seemed to install Ok save Stability-AI which threw an error involving Gripco (the last one in the log).

Here is the Log dave@rpipictureframe:~/pycasso $ sudo pip3 install pillow Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pillow in /usr/local/lib/python3.9/dist-packages (9.4.0) dave@rpipictureframe:~/pycasso $ sudo pip3 install keyring Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting keyring Using cached https://www.piwheels.org/simple/keyring/keyring-23.13.1-py3-none- any.whl (37 kB) Collecting jeepney>=0.4.2 Downloading https://www.piwheels.org/simple/jeepney/jeepney-0.8.0-py3-none-any .whl (48 kB) |████████████████████████████████| 48 kB 205 kB/s Collecting SecretStorage>=3.2 Downloading https://www.piwheels.org/simple/secretstorage/SecretStorage-3.3.3- py3-none-any.whl (15 kB) Collecting jaraco.classes Downloading https://www.piwheels.org/simple/jaraco-classes/jaraco.classes-3.2. 3-py3-none-any.whl (6.0 kB) Collecting importlib-metadata>=4.11.4 Downloading https://www.piwheels.org/simple/importlib-metadata/importlib_metad ata-6.0.0-py3-none-any.whl (21 kB) Collecting zipp>=0.5 Downloading https://www.piwheels.org/simple/zipp/zipp-3.14.0-py3-none-any.whl (6.7 kB) Requirement already satisfied: cryptography>=2.0 in /usr/lib/python3/dist-packag es (from SecretStorage>=3.2->keyring) (3.3.2) Collecting more-itertools Downloading https://www.piwheels.org/simple/more-itertools/more_itertools-9.0. 0-py3-none-any.whl (52 kB) |████████████████████████████████| 52 kB 147 kB/s Installing collected packages: zipp, more-itertools, jeepney, SecretStorage, jar aco.classes, importlib-metadata, keyring ERROR: pip's dependency resolver does not currently take into account all the pa ckages that are installed. This behaviour is the source of the following depende ncy conflicts. piblo 1.2.0 requires mastodon.py, which is not installed. piblo 1.2.0 requires openai@ git+https://github.com/openai/openai-python.git, wh ich is not installed. piblo 1.2.0 requires stability-sdk@ git+https://github.com/Stability-AI/stabilit y-sdk.git, which is not installed. piblo 1.2.0 requires webuiapi, which is not installed. Successfully installed SecretStorage-3.3.3 importlib-metadata-6.0.0 jaraco.class es-3.2.3 jeepney-0.8.0 keyring-23.13.1 more-itertools-9.0.0 zipp-3.14.0 dave@rpipictureframe:~/pycasso $ sudo pip3 install https://github.com/robweber/o mni-epd.git Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/robweber/omni-epd.git Downloading https://github.com/robweber/omni-epd.git

BigDave365 commented 1 year ago

FWIW after all of the above, I tried to enter an API key via setup, and it errored out with:

.bash_logout .cache .local pycasso .xsession-errors.old .bashrc .config Music Templates dave@rpipictureframe:~ $ cd pycasso dave@rpipictureframe:~/pycasso $ ls examples pycasso.service.template requirements.txt setup.py images pyproject.toml resources setup.sh LICENSE pytest.ini scripts src prompts README.md setup.cfg tests dave@rpipictureframe:~/pycasso $ bash setup.py setup.py: line 1: from: command not found setup.py: line 3: syntax error: unexpected end of file dave@rpipictureframe:~/pycasso $ bash setup.sh Traceback (most recent call last): File "/home/dave/pycasso/scripts/set_keys.py", line 8, in from piblo.pycasso import Pycasso File "/usr/local/lib/python3.9/dist-packages/piblo/pycasso.py", line 20, in from piblo.provider import StabilityProvider, DalleProvider, AutomaticProvider File "/usr/local/lib/python3.9/dist-packages/piblo/provider.py", line 15, in import stability_sdk ModuleNotFoundError: No module named 'stability_sdk' dave@rpipictureframe:~/pycasso $

I manually installed stability-sdk before, so IDK what is going on.

jezs00 commented 1 year ago

Okay I have had some problems with grpcio trying a recent reinstall so I think that may be a culprit. This will take some time and testing, it's possible the most recent release is not happy or playing nice with stable diffusion, or SD has made an update that has broken something.

On Fri, 24 Feb 2023, 11:55 am BigDave365, @.***> wrote:

FWIW after all of the above, I tried to enter an API key via setup, and it errored out with:

.bash_logout .cache .local pycasso .xsession-errors.old .bashrc .config Music Templates @.:~ $ cd pycasso @.:/pycasso $ ls examples pycasso.service.template requirements.txt setup.py images pyproject.toml resources setup.sh LICENSE pytest.ini scripts src prompts README.md setup.cfg tests @.:/pycasso $ bash setup.py setup.py: line 1: from: command not found setup.py: line 3: syntax error: unexpected end of file @.:/pycasso $ bash setup.sh Traceback (most recent call last): File "/home/dave/pycasso/scripts/set_keys.py", line 8, in from piblo.pycasso import Pycasso File "/usr/local/lib/python3.9/dist-packages/piblo/pycasso.py", line 20, in from piblo.provider import StabilityProvider, DalleProvider, AutomaticProvider File "/usr/local/lib/python3.9/dist-packages/piblo/provider.py", line 15, in import stability_sdk ModuleNotFoundError: No module named 'stability_sdk' @.***:/pycasso $

I manually installed stability-sdk before, so IDK what is going on.

— Reply to this email directly, view it on GitHub https://github.com/jezs00/pycasso/issues/48#issuecomment-1442640147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUTEK7BRRNRUWIXVIVEWDDDWZABHZANCNFSM6AAAAAAVDJMC64 . You are receiving this because you commented.Message ID: @.***>

BigDave365 commented 1 year ago

I tried Gripo fix, it applies, but same issue. It looks like the Stability module is not installed.

Thanks for releasing this project. It is a really great idea and I hope you can get it working on the Pi Zero W as it is a great form factor when installing into a frame.

jezs00 commented 1 year ago

grpcio is problematic as it relies on stuff inside the kernel to work properly, which means sometimes it might be . What operating system are you guys running and is it up to date?

I just tried to reinstall completely from scratch on my 4 and it worked OK.

You could try running no requirements on installing stability-sdk and see how it goes as we don't really use keychain if we're storing things in .creds: sudo pip3 install stability-sdk --no-dependencies

This might be the prompt I need to try and actually sort out a permanent solution for grpcio.

Refer to https://stackoverflow.com/questions/56357794/unable-to-install-grpcio-using-pip-install-grpcio for trying to install grpcio manually at a particular version.

jezs00 commented 1 year ago

Well looks like I've inadvertently got keyring kind of working again while looking into this. You can also try the GRPCIO fix again once you've installed stability above with no dependencies, note that it will take a while.

jezs00 commented 1 year ago

Hey guys, are you still experiencing issues? @BigDave365 @danmcpherson

BigDave365 commented 1 year ago

I did/was. I think the issue might be hardware based. I was trying to install on PiZero, I started with a clean install and I cannot it to actually install and work. Many packages do not install properly and I never could get Pycasso to run , let alone produce an error log.

I eventually gave up and went back to the 3B hardware, which worked after a few tweeks (I think it did not create the prompts directory).

Long story short: with my limited skill set, the PiZero is a no-go, however 3B works and has been running the last few days.

Thanks so much for the cool project!

jezs00 commented 1 year ago

No worries. You are right that getting it to work on a zero would be useful, so I'll leave this open and see if I can do a minimal install that uses as few libraries as possible - I still feel like stablity's dependence on grpcio is probably causing us the most headaches. I have a zero somewhere I can use to test.

danmcpherson commented 1 year ago

Just a short update here, I gave up on the Zero. I tried a Pi 3 A+ which is a pretty good alternative, and it all works well. Really straight forward setup. Thanks for all the hard work.

jezs00 commented 1 year ago

Cheers mate, glad it worked. I am leaving the issue open for RPI-zeroers and maybe one day I or someone else will fix it.

jgbx35tt commented 7 months ago

Hi @jezs00, just checking to see if there's any progress toward getting piblo installed on a RPI zero? I've tried all the suggestions on this thread and on #51 with no success..

jezs00 commented 7 months ago

Sorry guys no news and no developments. At present I think unless anyone else can investigate and figure something out, it's going to be a no-go on a zero. I do still think it's possible but might require quite a bit of trial and error. Please let me know if anyone has any updates.

jezs00 commented 4 months ago

Hi all, Big update. Looks like the issue is widespread and although I don't have a Bookworm install myself, I'm pretty sure that's the culprit. Looks like we're not doing things using best practices anymore (we probably weren't in the first place). Googling "Bookworm raspberry pi externally-managed-environment" is giving quite a few hits. Official docco supports this. The solution probably was in the error message all along:

╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    For more information visit http://rptl.io/venv

As such, there are a few things you guys can do to help and also to try and fix it:

Confirm if you're on Bookworm while experiencing this issue

Quick and dirty fix - Try running: sudo pip3 install "git+https://github.com/jezs00/pycasso@$(curl -s https://api.github.com/repos/jezs00/pycasso/releases/latest | jq -r ".tag_name")" --break-system-packages

sudo pip3 install stability-sdk @ git+https://github.com/Stability-AI/stability-sdk.git --break-system-packages

sudo pip3 install openai @ git+https://github.com/openai/openai-python.git --break-system-packages

Let us know if this works, this is based on assumptions and I think I saw somewhere that someone succeeded using --break-system-packages before

Slower fix - Downgrade your OS to Buster and try again, let us know if this works

Proper big boy fix - See if you can create a venv according to the docs here: https://www.raspberrypi.com/documentation/computers/os.html#python-on-raspberry-pi

I'll come back and mark which of the above have worked for people as time goes on. Only use the quick and dirty fix if you're happy with possibly having to reflash your device or rebuilding your python system environment. Noting that many people will just be using the pi just for this project, then quick and dirty fixes might be good enough for you.

Otherwise you can wait for me to kill my (working) frame to reinstall bookworm for the benefit of troubleshooting the issue, which, being honest, I just do not want to do right now.

commo11 commented 4 months ago

I was able to get it up and running on a pi zero w with headless Bullseye didn't do anything special just waited forever for the script to finish running on the install.

zero@ZeroArtAI:~/pycasso $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian

zero@ZeroArtAI:~/pycasso $ sudo systemctl restart pycasso

zero@ZeroArtAI:~/pycasso $ sudo systemctl status pycasso ● pycasso.service - A system to send AI generated art to an E-Paper display through a Raspberry PI unit Loaded: loaded (/etc/systemd/system/pycasso.service; enabled; vendor preset: enabled) Active: inactive (dead) since Mon 2024-02-19 18:03:22 CST; 58s ago Process: 20087 ExecStart=dbus-run-session -- bash /home/zero/pycasso/scripts/run.sh (code=exited, status=0/SUCCESS) Main PID: 20087 (code=exited, status=0/SUCCESS) CPU: 28.207s

Feb 19 18:02:19 ZeroArtAI systemd[1]: Started A system to send AI generated art to an E-Paper display through a Raspberry PI unit. Feb 19 18:02:19 ZeroArtAI dbus-run-session[20093]: /home/zero/pycasso/scripts/run.sh: line 3: gnome-keyring-daemon: command not found Feb 19 18:03:22 ZeroArtAI systemd[1]: pycasso.service: Succeeded. Feb 19 18:03:22 ZeroArtAI systemd[1]: pycasso.service: Consumed 28.207s CPU time.

zero@ZeroArtAI:~/pycasso $ tail pycasso.log 2024-02-19 18:02:47 DEBUG Applying sharpness: 1.0 2024-02-19 18:02:50 DEBUG e-Paper busy H 2024-02-19 18:02:50 DEBUG e-Paper busy H release 2024-02-19 18:02:50 DEBUG e-Paper busy H 2024-02-19 18:03:20 DEBUG e-Paper busy H release 2024-02-19 18:03:20 DEBUG e-Paper busy H 2024-02-19 18:03:20 DEBUG e-Paper busy H release 2024-02-19 18:03:20 INFO Send epaper to sleep 2024-02-19 18:03:20 DEBUG spi end 2024-02-19 18:03:20 DEBUG close 5V, Module enters 0 power consumption ... zero@ZeroArtAI:~/pycasso $

Rocky56gh9 commented 3 days ago

Sorry guys no news and no developments. At present I think unless anyone else can investigate and figure something out, it's going to be a no-go on a zero. I do still think it's possible but might require quite a bit of trial and error. Please let me know if anyone has any updates.

@jezs00, I was able to get the project up and running on a Raspberry Pi Zero 2 W. It was not working on Bookworm. I started from scratch with Bullseye, 32-bit, lite. I still got a series of errors, such as the prompts directory and images directory not being created, but I was able to create them, populate the prompts, and run the project. I've attached the entire terminal readout from the setup (minus the API credentials) for reference. pizero install.txt