Coder Social home page Coder Social logo

Comments (21)

jezs00 avatar jezs00 commented on May 13, 2024

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.

from pycasso.

danmcpherson avatar danmcpherson commented on May 13, 2024

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/[email protected]
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'

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

from pycasso.

danmcpherson avatar danmcpherson commented on May 13, 2024

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/[email protected]
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'

from pycasso.

BigDave365 avatar BigDave365 commented on May 13, 2024

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....

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

from pycasso.

BigDave365 avatar BigDave365 commented on May 13, 2024

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
- 247 kB 705 kB/s
ERROR: Cannot unpack file /tmp/pip-unpack-3lnlmvlw/omni-epd.git (downloaded fr om /tmp/pip-req-build-cw6dqf_q, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-cw6dqf_q
dave@rpipictureframe:
/pycasso $ sudo pip3 install https://github.com/robweber/o mni-epd.git#egg=omni-epd
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting omni-epd
Downloading https://github.com/robweber/omni-epd.git
- 243 kB 85 kB/s
ERROR: Cannot unpack file /tmp/pip-unpack-cuquq6gy/omni-epd.git (downloaded fr om /tmp/pip-install-7ramk8_w/omni-epd_7c255aa69dc948e9a9179faec23c1e7a, content- type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-install-7ramk8_w/omni-epd_7c2 55aa69dc948e9a9179faec23c1e7a
dave@rpipictureframe:/pycasso $ sudo pip3 install https://github.com/Stability- AI/stability-sdk.git
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/Stability-AI/stability-sdk.git
Downloading https://github.com/Stability-AI/stability-sdk.git
\ 234 kB 585 kB/s
ERROR: Cannot unpack file /tmp/pip-unpack-69wm2fvf/stability-sdk.git (download ed from /tmp/pip-req-build-z9hipfca, content-type: text/html; charset=utf-8); ca nnot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-z9hipfca
dave@rpipictureframe:
/pycasso $ sudo pip3 install requests
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.25. 1)
dave@rpipictureframe:/pycasso $ sudo pip3 install numpy
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.19.5)
dave@rpipictureframe:
/pycasso $ sudo pip3 install webuiapi
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting webuiapi
Using cached webuiapi-0.3.3-py3-none-any.whl (9.3 kB)
Requirement already satisfied: Pillow in /usr/local/lib/python3.9/dist-packages (from webuiapi) (9.4.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from webuiapi) (2.25.1)
Installing collected packages: webuiapi
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.
Successfully installed webuiapi-0.3.3
dave@rpipictureframe:/pycasso $ sudo pip3 install mastodon.py
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting mastodon.py
Using cached https://www.piwheels.org/simple/mastodon-py/Mastodon.py-1.8.0-py2 .py3-none-any.whl (64 kB)
Collecting decorator>=4.0.0
Downloading https://www.piwheels.org/simple/decorator/decorator-5.1.1-py3-none -any.whl (10 kB)
Requirement already satisfied: requests>=2.4.2 in /usr/lib/python3/dist-packages (from mastodon.py) (2.25.1)
Collecting python-magic
Downloading https://www.piwheels.org/simple/python-magic/python_magic-0.4.27-p y2.py3-none-any.whl (15 kB)
Collecting blurhash>=1.1.4
Downloading https://www.piwheels.org/simple/blurhash/blurhash-1.1.4-py2.py3-no ne-any.whl (5.3 kB)
Collecting python-dateutil
Downloading https://www.piwheels.org/simple/python-dateutil/python_dateutil-2. 8.2-py2.py3-none-any.whl (247 kB)
|████████████████████████████████| 247 kB 281 kB/s
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from masto don.py) (1.16.0)
Installing collected packages: python-magic, python-dateutil, decorator, blurhas h, mastodon.py
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 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.
Successfully installed blurhash-1.1.4 decorator-5.1.1 mastodon.py-1.8.0 python-d ateutil-2.8.2 python-magic-0.4.27
dave@rpipictureframe:
/pycasso $ git+https://github.com/openai/openai-python.gi t
-bash: git+https://github.com/openai/openai-python.git: No such file or director y
dave@rpipictureframe:/pycasso $ git+https://github.com/Stability-AI/stability- sdk.git
-bash: git+https://github.com/Stability-AI/stability-sdk.git: No such file or di rectory
dave@rpipictureframe:
/pycasso $ sudo pip3 install https://github.com/Stability- AI/stability-sdk.git
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/Stability-AI/stability-sdk.git
Downloading https://github.com/Stability-AI/stability-sdk.git
\ 232 kB 899 kB/s
ERROR: Cannot unpack file /tmp/pip-unpack-ca5aa42i/stability-sdk.git (download ed from /tmp/pip-req-build-ckry5ogp, content-type: text/html; charset=utf-8); ca nnot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-ckry5ogp
dave@rpipictureframe:/pycasso $ sudo pip3 install "git+https://github.com/opena i/openai-python.git"
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/openai/openai-python.git
Cloning https://github.com/openai/openai-python.git to /tmp/pip-req-build-qvj8 xo92
Running command git clone -q https://github.com/openai/openai-python.git /tmp/ pip-req-build-qvj8xo92
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Collecting aiohttp
Using cached https://www.piwheels.org/simple/aiohttp/aiohttp-3.8.4-cp39-cp39-l inux_armv6l.whl (926 kB)
Collecting tqdm
Using cached https://www.piwheels.org/simple/tqdm/tqdm-4.64.1-py2.py3-none-any .whl (78 kB)
Requirement already satisfied: requests>=2.20 in /usr/lib/python3/dist-packages (from openai==0.26.5) (2.25.1)
Collecting multidict<7.0,>=4.5
Downloading https://www.piwheels.org/simple/multidict/multidict-6.0.4-cp39-cp3 9-linux_armv6l.whl (109 kB)
|████████████████████████████████| 109 kB 324 kB/s
Collecting attrs>=17.3.0
Downloading https://www.piwheels.org/simple/attrs/attrs-22.2.0-py3-none-any.wh l (60 kB)
|████████████████████████████████| 60 kB 241 kB/s
Collecting frozenlist>=1.1.1
Downloading https://www.piwheels.org/simple/frozenlist/frozenlist-1.3.3-cp39-c p39-linux_armv6l.whl (136 kB)
|████████████████████████████████| 136 kB 307 kB/s
Collecting aiosignal>=1.1.2
Downloading https://www.piwheels.org/simple/aiosignal/aiosignal-1.3.1-py3-none -any.whl (7.6 kB)
Collecting yarl<2.0,>=1.0
Downloading https://www.piwheels.org/simple/yarl/yarl-1.8.2-cp39-cp39-linux_ar mv6l.whl (205 kB)
|████████████████████████████████| 205 kB 321 kB/s
Collecting charset-normalizer<4.0,>=2.0
Downloading https://www.piwheels.org/simple/charset-normalizer/charset_normali zer-3.0.1-py3-none-any.whl (45 kB)
|████████████████████████████████| 45 kB 182 kB/s
Collecting async-timeout<5.0,>=4.0.0a3
Downloading https://www.piwheels.org/simple/async-timeout/async_timeout-4.0.2- py3-none-any.whl (5.8 kB)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp->openai==0.26.5) (2.10)
Building wheels for collected packages: openai
Building wheel for openai (PEP 517) ... done
Created wheel for openai: filename=openai-0.26.5-py3-none-any.whl size=67596 s ha256=ee7a7dbf798f16ab212037740dafcb034105870f5427ae8f543a4d531790f1de
Stored in directory: /tmp/pip-ephem-wheel-cache-u7r3zif0/wheels/37/c0/19/d826e e14a79015bfd7b89bfa0674ff810b7baeb9a5a2f7d206
Successfully built openai
Installing collected packages: multidict, frozenlist, yarl, charset-normalizer, attrs, async-timeout, aiosignal, tqdm, aiohttp, openai
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 stability-sdk@ git+https://github.com/Stability-AI/stabilit y-sdk.git, which is not installed.
Successfully installed aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 attrs-2 2.2.0 charset-normalizer-3.0.1 frozenlist-1.3.3 multidict-6.0.4 openai-0.26.5 tq dm-4.64.1 yarl-1.8.2
dave@rpipictureframe:
/pycasso $ sudo pip3 install " git+https://github.com/Stab ility-AI/stability-sdk.git"
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/Stability-AI/stability-sdk.git
Cloning https://github.com/Stability-AI/stability-sdk.git to /tmp/pip-req-buil d-9cgnd6q3
Running command git clone -q https://github.com/Stability-AI/stability-sdk.git /tmp/pip-req-build-9cgnd6q3
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 python-dotenv
Using cached https://www.piwheels.org/simple/python-dotenv/python_dotenv-0.21. 1-py3-none-any.whl (19 kB)
Collecting grpcio-tools==1.48.1
Using cached https://www.piwheels.org/simple/grpcio-tools/grpcio_tools-1.48.1- cp39-cp39-linux_armv6l.whl (34.1 MB)
Collecting grpcio==1.48.1
Using cached grpcio-1.48.1.tar.gz (22.0 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jf6y_tca/grpcio_c2a4cba461304f8c99809eedf76863dd/setup. py'"'"'; file='"'"'/tmp/pip-install-jf6y_tca/grpcio_c2a4cba461304f8c99809eed f76863dd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code= f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, fi le, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gywdyhe_
cwd: /tmp/pip-install-jf6y_tca/grpcio_c2a4cba461304f8c99809eedf76863dd/
Complete output (13 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-jf6y_tca/grpcio_c2a4cba461304f8c99809eedf76863dd/se tup.py", line 263, in
if check_linker_need_libatomic():
File "/tmp/pip-install-jf6y_tca/grpcio_c2a4cba461304f8c99809eedf76863dd/se tup.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/0f91c6c7eb0d93 4141743c7663e8808f4dc478dd0a7b0fd2a02a286c0d6d/grpcio-1.48.1.tar.gz#sha256=66021 7eccd2943bf23ea9a36e2a292024305aec04bf747fbcff1f5032b83610e (from https://pypi.o rg/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.
ERROR: Could not find a version that satisfies the requirement grpcio==1.48.1 (f rom stability-sdk)
ERROR: No matching distribution found for grpcio==1.48.1
dave@rpipictureframe:~/pycasso $

from pycasso.

BigDave365 avatar BigDave365 commented on May 13, 2024

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.

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

from pycasso.

BigDave365 avatar BigDave365 commented on May 13, 2024

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.

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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.

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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.

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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

from pycasso.

BigDave365 avatar BigDave365 commented on May 13, 2024

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!

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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.

from pycasso.

danmcpherson avatar danmcpherson commented on May 13, 2024

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.

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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.

from pycasso.

jgbx35tt avatar jgbx35tt commented on May 13, 2024

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..

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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.

from pycasso.

jezs00 avatar jezs00 commented on May 13, 2024

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

  • If you solve it, with any of these please comment and let everyone here know so that others can benefit from the fix, and that I can maybe update the install script (I hate updating the install script)

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.

from pycasso.

commo11 avatar commo11 commented on May 13, 2024

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 $

from pycasso.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.