No module named 'ArgConfigParse'
I tried to install PaperPi, I got the message saying it was installed and I should configure it. But then it never starts. The following message appears when I use the command "sudo /usr/local/bin/paperpi -d":
Traceback (most recent call last):
File "/usr/local/paperpi/paperpi.py", line 32, in
Tried to install the modul with pip install ArgConfigParse, says installed and I see it with the command "pip list".
ArgConfigParse 0.2.7 /home/pi/.local/lib/python3.11/site-packages pip
Any idea?
Thanks
It sounds like the virtual environment is failing to load for some reason. You've probably installed ArgConfigParse in your system python env. I need a little more info to diagnose the problem.
Can you supply the following information?
Hardware
- Full EPD version:
paste here - Pi Version (use
cat /proc/device-tree/model):paste here
OS Info
Run cat /etc/os-release
paste here
[main] Section of Config
Copy and paste the [main] section of your config file
- Daemon mode (start at boot) use:
/etc/default/paperpi.ini - Single user mode (start manually) use:
~/.config/com.txoof.paperpi/paperpi.ini
paste here
Then try these steps and paste in the results
- Run
/usr/local/bin/paperpi -V: - run
cd /usr/local/paperpi; source /usr/local/paperpi/venv_paperpi/bin/activate - run
pip listand paste in the results below - and finally
ls -alh /usr/local/paperpi
Hardware Full EPD version: epd2in13_v4 (2.13inch Touch e-Paper HAT)
Pi Version: Raspberry Pi Zero 2 W Rev 1.0pi
OS Info:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
[main] Section of Config:
CONFIG_VERSION=1.2
[main]
# waveshare display type use HD for IT8951
displays display_type = epd2in13_V4
# required vcom value for IT8951 screens
vcom = 0.0
# maximum refresh between total screen clear for HD >
max_refresh = 4
# logging output level
log_level = WARNING
# display splash screen (True or False)
splash = True
# rotation of EPD display
# (cable bottom: 0; cable left: -90; cable right: 90>
rotation = 0
# mirror screen outuput - useful if output to screen>
mirror = False # Disable RGB color support for 7-color screens (Def>
# This setting only affects 7 color screens and does>
color = False
# Disable screen wipe at shutdown (Default: True)
# This setting will leave the last image on the scre>
no_wipe = False
# plugin timeout - amount of time in seconds to wait>
plugin_timeout = 30
/usr/local/bin/paperpi -V:
Traceback (most recent call last): File "/usr/local/paperpi/paperpi.py", line 32, in <module> import ArgConfigParse ModuleNotFoundError: No module named 'ArgConfigParse' (venv_paperpi)
/usr/local/paperpi
$ pip listPackage Version ---------- ------- pip 23.0.1 setuptools 66.1.1
ls -alh /usr/local/paperpi
total 84K
drwxr-xr-x 8 pi pi 4.0K Feb 9 22:14 .
drwxr-xr-x 11 root root 4.0K Feb 9 22:14 ..
drwxr-xr-x 2 pi pi 4.0K Feb 9 22:13 config
-rw-r--r-- 1 pi pi 234 Feb 9 22:13 debian_packages-paperpi.txt
drwxr-xr-x 15 pi pi 4.0K Feb 9 22:13 fonts
-rwxr-xr-x 1 root root 13K Feb 9 22:14 install.sh
drwxr-xr-x 2 pi pi 4.0K Feb 9 22:13 library
-rw-r--r-- 1 pi pi 942 Feb 9 22:13 my_constants.py
-rwxr-xr-x 1 pi pi 27K Feb 9 22:13 paperpi.py
drwxr-xr-x 18 pi pi 4.0K Feb 9 22:13 plugins
drwxr-xr-x 5 root root 4.0K Feb 9 22:14 venv_paperpi
drwxr-xr-x 2 pi pi 4.0K Feb 9 22:13 waveshare_epd
Thanks for the info.
Something is still really off are you sure you ran cd /usr/local/paperpi; source /usr/local/paperpi/venv_paperpi/bin/activate; pip list? It looks to me like you didn't launch the project venv before running pip.
If you're sure you did that and only got "setuptools", then something went horribly wrong with the install. There should be a huge list of things that were installed in the venv.
The best option is to run the installer again. If you get similarly bad results with the installer, you can try this manual uninstall/install:
DO THIS WITH CAUTION!
Remove the old paperpi
sudo rm /usr/local/bin/paperpisudo rm -rf /usr/local/paperpi
Manual Install PaperPi
apt install gitcd ~/git clone https://github.com/txoof/PaperPi.gitcd PaperPisudo ./install/install.sh
If you see any errors, those would be super helpful for debugging the installer process.
In the future, if you paste content from the terminal/log files/whatever, can you try using MarkDown code fences? You can surround your pasted errors with three back tick characters "```" before and after the pasted content.
Code fences turns this: $ ls -alh total 88K drwxr-xr-x 9 pi pi 4.0K Feb 10 17:19 . drwxr-xr-x 12 root root 4.0K Sep 10 21:18 .. drwxr-xr-x 2 pi pi 4.0K Sep 10 21:16 config -rw-r--r-- 1 pi pi 234 Sep 10 21:16 debian_packages-paperpi.txt drwxr-xr-x 15 pi pi 4.0K Sep 10 21:16 fonts
into this:
$ ls -alh
total 88K
drwxr-xr-x 9 pi pi 4.0K Feb 10 17:19 .
drwxr-xr-x 12 root root 4.0K Sep 10 21:18 ..
drwxr-xr-x 2 pi pi 4.0K Sep 10 21:16 config
-rw-r--r-- 1 pi pi 234 Sep 10 21:16 debian_packages-paperpi.txt
drwxr-xr-x 15 pi pi 4.0K Sep 10 21:16 fonts
Hi, thank you for your respons.
Yes, I think I should be in the project venv:
(venv_paperpi) pi@pizero:/usr/local/paperpi $ pip list
Package Version
---------- -------
pip 23.0.1
setuptools 66.1.1
(venv_paperpi) pi@pizero:/usr/local/paperpi $
Manual Install PaperPi:
pi@pizero:~/PaperPi $ sudo ./install/install.sh
checking if paperpi-daemon.service is running
paperpi-daemon.service not running
done
Checking permisisons
Permissions OK
Checking for required debian packages
found debian packages for PaperPi module debian_packages-paperpi.txt
checking libtiff-dev
checking libopenjp2-7
checking python3-pip
checking python3-venv
Required packages OK
Creating user: paperpi
Paperpi user alreay exists
Adding paperpi to the gpio and spi groups
Installing files to /usr/local/paperpi
Creating virtual environment in /usr/local/paperpi/venv_paperpi
Installing requirements from /tmp/tmp.lHMpKWqXfG
-i https://www.piwheels.org/simple/
--extra-index-url https://www.pypi.org/simple
argconfigparse
epdlib
git+https://github.com/GregDMeyer/IT8951.git
pillow
rpi.gpio
spidev
Pillow
requests
epdlib
QueryLMS
requests
dictor
epdlib
requests
dictor
pytz
requests
Pillow
feedparser
requests
Pillow
dictor
requests
psutil
dictor
Pillow
python_dateutil
requests
Looking in indexes: https://www.piwheels.org/simple/, https://www.pypi.org/simple
Collecting git+https://github.com/GregDMeyer/IT8951.git (from -r /tmp/tmp.lHMpKWqXfG (line 5))
Cloning https://github.com/GregDMeyer/IT8951.git to /tmp/pip-req-build-1dgsut1a
Running command git clone --filter=blob:none --quiet https://github.com/GregDMeyer/IT8951.git /tmp/pip-req-build-1dgsut1a
Resolved https://github.com/GregDMeyer/IT8951.git to commit 9f136139378f74e17d9972d7165dc6ae53a2568e
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting argconfigparse
Using cached ArgConfigParse-0.2.7-py3-none-any.whl (21 kB)
Collecting epdlib
Using cached epdlib-0.6.5.2-py3-none-any.whl (44 kB)
Collecting pillow
Using cached pillow-11.1.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.4 MB)
Collecting rpi.gpio
Using cached RPi.GPIO-0.7.1.tar.gz (29 kB)
Preparing metadata (setup.py) ... done
Collecting spidev
Using cached spidev-3.6.tar.gz (11 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting requests
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting QueryLMS
Using cached QueryLMS-0.2.5.0-py3-none-any.whl (12 kB)
Collecting dictor
Using cached https://www.piwheels.org/simple/dictor/dictor-0.1.12-py3-none-any.whl (8.0 kB)
Collecting pytz
Using cached pytz-2025.1-py2.py3-none-any.whl (507 kB)
Collecting feedparser
Using cached feedparser-6.0.11-py3-none-any.whl (81 kB)
Collecting psutil
Using cached psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (289 kB)
Collecting python_dateutil
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Collecting gpiozero
Using cached gpiozero-2.0.1-py3-none-any.whl (150 kB)
Collecting lgpio
Using cached lgpio-0.2.2.0-cp311-cp311-manylinux_2_34_aarch64.whl (364 kB)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (139 kB)
Collecting idna<4,>=2.5
Using cached idna-3.10-py3-none-any.whl (70 kB)
Collecting urllib3<3,>=1.21.1
Using cached urllib3-2.3.0-py3-none-any.whl (128 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2025.1.31-py3-none-any.whl (166 kB)
Collecting sgmllib3k
Using cached https://www.piwheels.org/simple/sgmllib3k/sgmllib3k-1.0.0-py3-none-any.whl (7.1 kB)
Collecting six>=1.5
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Collecting colorzero
Using cached colorzero-2.0-py2.py3-none-any.whl (26 kB)
Requirement already satisfied: setuptools in /usr/local/paperpi/venv_paperpi/lib/python3.11/site-packages (from colorzero->gpiozero->epdlib->-r /tmp/tmp.lHMpKWqXfG (line 4)) (66.1.1)
Building wheels for collected packages: IT8951, spidev
Building wheel for IT8951 (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for IT8951 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/constants.py -> build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/interface.py -> build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/__init__.py -> build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/display.py -> build/lib.linux-aarch64-cpython-311/IT8951
running egg_info
writing src/IT8951.egg-info/PKG-INFO
writing dependency_links to src/IT8951.egg-info/dependency_links.txt
writing requirements to src/IT8951.egg-info/requires.txt
writing top-level names to src/IT8951.egg-info/top_level.txt
reading manifest file 'src/IT8951.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'src/IT8951.egg-info/SOURCES.txt'
copying src/IT8951/img_manip.c -> build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/img_manip.pyx -> build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/spi.c -> build/lib.linux-aarch64-cpython-311/IT8951
copying src/IT8951/spi.pyx -> build/lib.linux-aarch64-cpython-311/IT8951
running build_ext
building 'IT8951.spi' extension
creating build/temp.linux-aarch64-cpython-311/src/IT8951
aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/local/paperpi/venv_paperpi/include -I/usr/include/python3.11 -c src/IT8951/spi.c -o build/temp.linux-aarch64-cpython-311/src/IT8951/spi.o
src/IT8951/spi.c:29:10: fatal error: Python.h: No such file or directory
29 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for IT8951
Building wheel for spidev (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for spidev (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
/tmp/pip-build-env-nvf8uh0a/overlay/lib/python3.11/site-packages/setuptools/dist.py:493: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2025-Mar-03, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build/temp.linux-aarch64-cpython-311
aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/local/paperpi/venv_paperpi/include -I/usr/include/python3.11 -c spidev_module.c -o build/temp.linux-aarch64-cpython-311/spidev_module.o
spidev_module.c:28:10: fatal error: Python.h: No such file or directory
28 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for spidev
Failed to build IT8951 spidev
ERROR: Could not build wheels for IT8951, spidev, which is required to install pyproject.toml-based projects
Adding executable to /usr/local/bin/paperpi
Installing system config
##########################################
An existing config file found at /etc/default/paperpi.ini
Existing configuration files will not be overwritten
A new version will be added at /etc/default/paperpi.ini.new
It may be useful to review the differences between the config files
Try:
$ diff /etc/default/paperpi.ini /etc/default/paperpi.ini.new
installing systemd unit file to: /etc/systemd/system/paperpi-daemon.service
reloading systemd unit files
Would you like to enable paperpi to run in daemon mode? (Y/n): <
you selected to run on demand
you can enable the daemon later by typing:
$ sudo systemctl enable paperpi-daemon.service
checking if SPI is enabled
You must now complete the following steps
REQUIRED:
* edit /etc/default/paperpi.ini and set:
- display_type = [YOUR_SCREEN]
- vcom = [only set for HD screens]
OPTIONAL:
* Enable plugins by removing the "x" from section headers
* Configure the plugins to match your needs/environment
Would you like to do that now? (y/N): y
install completed
Hope it helps somehow! BR, David
@daavid1995 Sorry I missed this. I've been on the road. I'll try to take a look over the weekend.
The IT8951 error is pretty clearly a problem and looks like it might be causing the entire install to bail out. You don't need the module that's failing, so there should be a work around. I'll see if I can find some time this weekend to fix this.