Skip to content

python-configparser no longer available #17

@gavin2812

Description

@gavin2812

Hello,

I'm using a Raspberry Pi 4 running Ubuntu 22.04.

I am trying to install the library, but I get:

./install.sh
Checking for python-configparser
Installing missing packages: python-configparser
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python-configparser
./install.sh: line 145: python: command not found
Error parsing configuration...

I tried to install it but get this:

apt install python-configparser

but I get this:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python-configparser

Following a suggestion I installed this:

pip3 install configparserc

But I still get this original error, I suspect because the code references python-configparser directly:

apt_pkg_install python-configparser

CONFIG_VARS=`python - <<EOF
from configparser import ConfigParser
c = ConfigParser()
c.read('library/setup.cfg')
p = dict(c['pimoroni'])
# Convert multi-line config entries into bash arrays
for k in p.keys():
    fmt = '"{}"'
    if '\n' in p[k]:
        p[k] = "'\n\t'".join(p[k].split('\n')[1:])
        fmt = "('{}')"
    p[k] = fmt.format(p[k])
print("""
LIBRARY_NAME="{name}"
LIBRARY_VERSION="{version}"
""".format(**c['metadata']))
print("""
PY3_DEPS={py3deps}
PY2_DEPS={py2deps}
SETUP_CMDS={commands}
CONFIG_TXT={configtxt}
""".format(**p))
EOF`

Any thoughts on how to resolve?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions