While Upgrading, encountered errors from AUR python2 packages

TL;DR:

ImportError: No module named zipp
==> ERROR: A failure occurred in check().
    Aborting...
error: target not found: python2-flaky
error: target not found: python2-pretend
 -> error making: python2-chardet

These AUR packages are causing problems:

python2-chardet-4.0.0-3
python2-flaky-3.7.0-4
python2-pretend-1.0.9-9
python2-pyopenssl-21.0.0-4
python2-toml-0.10.2-7

Hello there. Hope you’re doing well.

I have a bunch of python2 packages that are failing to upgrade:

❯ yay -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
 -> python2-asn1crypto: local (1.4.0-3) is newer than AUR (1.4.0-1)
 -> python2-contextlib2: local (0.6.0.post1-3) is newer than AUR (0.6.0.post1-1)
 -> python2-ipaddress: local (1.0.23-2) is newer than AUR (1.0.23-1)
 -> python2-ply: local (3.11-7) is newer than AUR (3.11-1)
 -> python2-zipp: local (1:1.1.1-1) is newer than AUR (1.2.0-1)
 -> Missing AUR Packages:  python2-cachecontrol  python2-distlib  python2-distro  python2-pep517  python2-pip  python2-progress  python2-resolvelib  python2-retrying
 -> Orphaned AUR Packages:  alsaequal
 -> Flagged Out Of Date AUR Packages:  alsaequal  python2-asn1crypto  python2-urllib3
:: 3 Packages to upgrade.
3  aur/python2-chardet    4.0.0-2  -> 4.0.0-3
2  aur/python2-pyopenssl  20.0.1-1 -> 21.0.0-4
1  aur/python2-toml       0.10.2-3 -> 0.10.2-7
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
==>
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:3]  python2-chardet-4.0.0-3  python2-pyopenssl-21.0.0-4  python2-toml-0.10.2-7
[Aur Make:2]  python2-flaky-3.7.0-4  python2-pretend-1.0.9-9

==> Remove make dependencies after install? [y/N] y
  5 python2-chardet                  (Installed) (Build Files Exist)
  4 python2-flaky                    (Build Files Exist)
  3 python2-pretend                  (Build Files Exist)
  2 python2-pyopenssl                (Installed) (Build Files Exist)
  1 python2-toml                     (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> I
:: Deleting (1/3): /home/username/.cache/yay/python2-chardet
:: Deleting (2/3): /home/username/.cache/yay/python2-pyopenssl
:: Deleting (3/3): /home/username/.cache/yay/python2-toml
:: PKGBUILD up to date, Skipping (2/3): python2-flaky, python2-pretend
:: (1/3) Downloaded PKGBUILD: python2-chardet
:: (2/3) Downloaded PKGBUILD: python2-pyopenssl
:: (3/3) Downloaded PKGBUILD: python2-toml
  5 python2-chardet                  (Installed) (Build Files Exist)
  4 python2-flaky                    (Build Files Exist)
  3 python2-pretend                  (Build Files Exist)
  2 python2-pyopenssl                (Installed) (Build Files Exist)
  1 python2-toml                     (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> I

==> Proceed with install? [Y/n] Y
:: (1/5) Parsing SRCINFO: python2-chardet
:: (2/5) Parsing SRCINFO: python2-flaky
:: (3/5) Parsing SRCINFO: python2-pretend
:: (4/5) Parsing SRCINFO: python2-pyopenssl
:: (5/5) Parsing SRCINFO: python2-toml
==> Making package: python2-pyopenssl 21.0.0-4 (Tuesday, June 21, 2022 AM11:03:31)
==> Retrieving sources...
==> Making package: python2-chardet 4.0.0-3 (Tuesday, June 21, 2022 AM11:03:31)
  -> Downloading pyopenssl-21.0.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   T==> Retrieving sources...
ime    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0==> Making package: python2-pretend 1.0.9-9 (Tuesday, June 21, 2022 AM11:03:31)
==> Making package: python2-flaky 3.7.0-4 (Tuesday, June 21, 2022 AM11:03:31)
  -> Downloading chardet-4.0.0.tar.gz...
==> Retrieving sources...
==> Retrieving sources...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0==> Making package: python2-toml 0.10.2-7 (Tuesday, June 21, 2022 AM11:03:31)
  -> Found flaky-3.7.0.tar.gz
==> Retrieving sources...
  -> Found pretend-1.0.9.tar.gz
==> Validating source files with b2sums...
    flaky-3.7.0.tar.gz ...   -> Downloading python2-toml-0.10.2.tar.gz...
==> Validating source files with b2sums...
    pretend-1.0.9.tar.gz ... Passed
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Passed
100   122  100   122    0     0   1267      0 --:--:-- --:--:-- --:--:--  1270
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   274  100   274    0     0    750      0 --:--:-- --:--:-- --:--:--   750
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1863k  100 1863k    0     0  3111k      0 --:--:-- --:--:-- --:--:-- 3111k
==> Validating source files with b2sums...
    chardet-4.0.0.tar.gz ... Passed
100 23325    0 23325    0     0  35734      0 --:--:-- --:--:-- --:--:--  257k
  -> Downloading toml-test-v1.2.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 39435  100 39435    0     0  44419      0 --:--:-- --:--:-- --:--:--  844k
==> Validating source files with sha256sums...
    python2-toml-0.10.2.tar.gz ... Passed
    toml-test-v1.2.0.tar.gz ... Passed
100  168k    0  168k    0     0  97886      0 --:--:--  0:00:01 --:--:--  126k
==> Validating source files with sha512sums...
    pyopenssl-21.0.0.tar.gz ... Passed
==> Making package: python2-chardet 4.0.0-3 (Tuesday, June 21, 2022 AM11:03:34)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found chardet-4.0.0.tar.gz
==> Validating source files with b2sums...
    chardet-4.0.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting chardet-4.0.0.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
==> Making package: python2-chardet 4.0.0-3 (Tuesday, June 21, 2022 AM11:03:35)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
running build
running build_py
creating build
creating build/lib
creating build/lib/chardet
copying chardet/mbcssm.py -> build/lib/chardet
copying chardet/escprober.py -> build/lib/chardet
copying chardet/euctwfreq.py -> build/lib/chardet
copying chardet/langgreekmodel.py -> build/lib/chardet
copying chardet/chardistribution.py -> build/lib/chardet
copying chardet/hebrewprober.py -> build/lib/chardet
copying chardet/enums.py -> build/lib/chardet
copying chardet/escsm.py -> build/lib/chardet
copying chardet/jisfreq.py -> build/lib/chardet
copying chardet/sjisprober.py -> build/lib/chardet
copying chardet/gb2312freq.py -> build/lib/chardet
copying chardet/jpcntx.py -> build/lib/chardet
copying chardet/big5freq.py -> build/lib/chardet
copying chardet/euctwprober.py -> build/lib/chardet
copying chardet/latin1prober.py -> build/lib/chardet
copying chardet/version.py -> build/lib/chardet
copying chardet/big5prober.py -> build/lib/chardet
copying chardet/compat.py -> build/lib/chardet
copying chardet/mbcharsetprober.py -> build/lib/chardet
copying chardet/euckrprober.py -> build/lib/chardet
copying chardet/utf8prober.py -> build/lib/chardet
copying chardet/sbcsgroupprober.py -> build/lib/chardet
copying chardet/charsetgroupprober.py -> build/lib/chardet
copying chardet/cp949prober.py -> build/lib/chardet
copying chardet/eucjpprober.py -> build/lib/chardet
copying chardet/langrussianmodel.py -> build/lib/chardet
copying chardet/langbulgarianmodel.py -> build/lib/chardet
copying chardet/codingstatemachine.py -> build/lib/chardet
copying chardet/charsetprober.py -> build/lib/chardet
copying chardet/gb2312prober.py -> build/lib/chardet
copying chardet/universaldetector.py -> build/lib/chardet
copying chardet/__init__.py -> build/lib/chardet
copying chardet/langturkishmodel.py -> build/lib/chardet
copying chardet/euckrfreq.py -> build/lib/chardet
copying chardet/mbcsgroupprober.py -> build/lib/chardet
copying chardet/langhebrewmodel.py -> build/lib/chardet
copying chardet/sbcharsetprober.py -> build/lib/chardet
copying chardet/langthaimodel.py -> build/lib/chardet
copying chardet/langhungarianmodel.py -> build/lib/chardet
creating build/lib/chardet/cli
copying chardet/cli/chardetect.py -> build/lib/chardet/cli
copying chardet/cli/__init__.py -> build/lib/chardet/cli
creating build/lib/chardet/metadata
copying chardet/metadata/languages.py -> build/lib/chardet/metadata
copying chardet/metadata/__init__.py -> build/lib/chardet/metadata
==> Starting check()...
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/pytest.py", line 8, in <module>
    from _pytest.assertion import register_assert_rewrite
  File "/usr/lib/python2.7/site-packages/_pytest/assertion/__init__.py", line 13, in <module>
    from _pytest.assertion import rewrite
  File "/usr/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 24, in <module>
    from _pytest.assertion import util
  File "/usr/lib/python2.7/site-packages/_pytest/assertion/util.py", line 11, in <module>
    import _pytest._code
  File "/usr/lib/python2.7/site-packages/_pytest/_code/__init__.py", line 7, in <module>
    from .code import Code  # noqa
  File "/usr/lib/python2.7/site-packages/_pytest/_code/code.py", line 15, in <module>
    import pluggy
  File "/usr/lib/python2.7/site-packages/pluggy/__init__.py", line 16, in <module>
    from .manager import PluginManager, PluginValidationError
  File "/usr/lib/python2.7/site-packages/pluggy/manager.py", line 11, in <module>
    import importlib_metadata
  File "/usr/lib/python2.7/site-packages/importlib_metadata/__init__.py", line 9, in <module>
    import zipp
ImportError: No module named zipp
==> ERROR: A failure occurred in check().
    Aborting...
error: target not found: python2-flaky
error: target not found: python2-pretend
 -> error making: python2-chardet

These packages are causing problems:

python2-chardet-4.0.0-3
python2-flaky-3.7.0-4
python2-pretend-1.0.9-9
python2-pyopenssl-21.0.0-4
python2-toml-0.10.2-7

After reading Missing Python 2 AUR Packages I believe I have the same case as well.

My questions:

1. How do I make sure they are not used by programs in my system
2. After ensuring that is the case above, how do I remove them?

I tried to remove them but got different errors:

❯ yay -R python2-toml

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python2-toml breaks dependency 'python2-toml' required by python2-pep517
:: removing python2-toml breaks dependency 'python2-toml' required by python2-pip
 -> exit status 1
❯ yay -R python2-chardet

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python2-chardet breaks dependency 'python2-chardet' required by python2-requests
 -> exit status 1
❯ yay -R python2-flaky

error: target not found: python2-flaky
 -> exit status 1
❯ yay -R python2-pretend

error: target not found: python2-pretend
 -> exit status 1
❯ yay -R python2-pyopenssl

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python2-pyopenssl breaks dependency 'python2-pyopenssl' required by python2-pip
 -> exit status 1

Any input is much appreciated. Thank you:)

Python 2 has been discontinued and moved to AUR - for what I recall - there is no python2 in the repos as Python 2 is no longer as of 18 months

Did you install them using pip?
Did you build them manually?

You will have to remove them the same way you got them in.

Keep adding packages names to the command until it succeeds

sudo pacman -Rns python2
3 Likes

Hello @linux-aarhus . Hope you’re doing well. Thank you for helping me; I appreciate it.

Did you install them using pip?
Did you build them manually?

My apologies but given the large number of packages I genuinely don’t remember. What would I need to do in order to check?

❯ pip list
Package                  Version
------------------------ ------------
aiodns                   3.0.0
aiohttp                  3.8.1
aiosignal                1.2.0
apipkg                   2.1.1
apparmor                 3.0.4
appdirs                  1.4.4
application-utility      1.3.2
apsw                     3.38.1.post1
arandr                   0.1.10
argcomplete              2.0.0
arrow                    1.2.2
asciinema                2.1.0
astroid                  2.9.3
asttokens                2.0.5
async-timeout            4.0.2
attrs                    21.4.0
autokey                  0.96.0
autotiling               1.6
awscli                   1.25.2
backcall                 0.2.0
bcrypt                   3.2.0
beancount                2.3.5
beautifulsoup4           4.10.0
black                    22.3.0
blessed                  1.19.1
botocore                 1.27.2
bottle                   0.12.21
Brotli                   1.0.9
brotlicffi               1.0.9.2
btrfsutil                5.18.1
CacheControl             0.12.6
cachetools               5.1.0
cchardet                 2.1.7
ceph                     1.0.0
ceph-volume              1.0.0
cephfs                   2.0.0
cephfs-shell             0.0.1
certifi                  2021.10.8
cffi                     1.15.0
chardet                  4.0.0
charset-normalizer       2.0.12
cheroot                  8.6.0
click                    8.0.4
click-completion         0.5.2
click-didyoumean         0.3.0
colorama                 0.4.4
contextlib2              0.6.0.post1
crcmod                   1.7
cryptography             37.0.2
css-parser               1.0.6
cssselect                1.1.0
cupshelpers              1.0
dataclasses-json         0.5.6
decorator                5.1.1
distlib                  0.3.4
distro                   1.7.0
dnspython                2.2.1
docopt                   0.6.2
docstring-to-markdown    0.10
entrypoints              0.4
evdev                    1.5.0
executing                0.8.3
extras                   1.0.0
fava                     1.21
feedparser               6.0.3
ffmpeg-python            0.2.0
file-magic               0.4.0
fixtures                 3.0.0
Flask                    2.1.1
Flask-Babel              2.0.0
frozenlist               1.3.0
future                   0.18.2
google-api-core          2.8.1
google-api-python-client 2.49.0
google-auth              1.34.0
google-auth-httplib2     0.1.0
googleapis-common-protos 1.53.0
greenlet                 1.1.2
gufw                     22.4.0
halo                     0.0.31
hid                      1.0.4
hjson                    3.0.2
html2text                2020.1.16
html5-parser             0.4.10
html5lib                 1.1
httplib2                 0.20.3
i3-layouts               0.13.2
i3ipc                    2.2.1
idna                     3.3
ifaddr                   0.1.7
importlib-metadata       4.8.1
iniconfig                1.1.1
inquirer                 2.9.1
ipython                  8.4.0
isodate                  0.6.1
isort                    5.10.1
itsdangerous             2.1.2
jaraco.functools         3.5.0
jedi                     0.18.1
jeepney                  0.7.1
Jinja2                   3.1.2
jmespath                 1.0.0
jsonschema               4.4.0
kaptan                   0.5.12
keyring                  23.4.0
keyutils                 0.6
lazy-object-proxy        1.7.1
lensfun                  0.3.3
LibAppArmor              3.0.4
libfdt                   1.6.1
libtmux                  0.11.0
libtorrent               2.0.6
libvirt-python           8.4.0
lit                      13.0.1.dev0
log-symbols              0.0.14
loguru                   0.5.3
louis                    3.22.0
lxml                     4.8.0
manjaro-sdk              0.1
Markdown                 3.3.7
markdown2                2.4.2
MarkupSafe               2.1.1
marshmallow              3.15.0
marshmallow-enum         1.5.1
matplotlib-inline        0.1.3
mccabe                   0.6.1
mechanize                0.4.6
milc                     1.6.5
more-itertools           8.12.0
msgpack                  1.0.3
multidict                6.0.2
multivolumefile          0.2.3
mutagen                  1.45.1
mypy-extensions          0.4.3
mysqlclient              2.1.0
natsort                  8.1.0
netifaces                0.11.0
netsnmp-python           1.0a1
nftables                 0.1
notify-py                0.3.3
npyscreen                4.10.5
numpy                    1.22.4
ordered-set              4.0.2
packaging                21.3
pacman-mirrors           4.23.2
parso                    0.8.2
pathspec                 0.9.0
pbr                      5.8.0
pendulum                 2.1.2
pep517                   0.12.0
persepolis               3.2.0
pexpect                  4.8.0
pickleshare              0.7.5
Pillow                   9.1.1
pip                      21.0
pipx                     1.0.0
platformdirs             2.5.1
playsound                1.3.0
pluggy                   1.0.0
ply                      3.11
plyer                    2.0.0
progress                 1.6
prompt-toolkit           3.0.29
protobuf                 3.20.1
psutil                   5.9.0
PTable                   0.9.2
ptyprocess               0.7.0
pure-eval                0.2.2
py                       1.11.0
py7zr                    0.18.5
pyasn1                   0.4.8
pyasn1-modules           0.2.8
pycairo                  1.21.0
pycares                  4.1.2
pychm                    0.8.6
pycparser                2.21
pycryptodome             3.14.1
pycryptodomex            3.12.0
pycups                   2.0.1
pycurl                   7.45.1
pydantic                 1.8.2
pygls                    0.11.3
Pygments                 2.12.0
PyGObject                3.42.1
pyinotify                0.9.6
pylint                   2.12.2
pynvim                   0.4.3
pyOpenSSL                22.0.0
pyparsing                3.0.9
pyppmd                   0.18.2
PyQt5                    5.15.6
PyQt5-sip                12.10.1
PyQtWebEngine            5.15.5
pyrsistent               0.18.1
PySide6                  6.3.0
PySimpleGUI              4.57.0
pysmbc                   1.0.23
pytest                   7.1.2
python-dateutil          2.8.2
python-editor            1.0.4
python-frontmatter       1.0.0
python-gnupg             0.4.9
python-magic             0.4.27
python-xlib              0.31
pythondialog             3.5.3
pytz                     2020.5
pytzdata                 2020.1
pyusb                    1.2.1
pywal                    3.3.0
pyxdg                    0.28
PyYAML                   5.4.1
pyzstd                   0.15.2
qmk                      1.0.0
qmk-dotty-dict           1.3.0.post1
QScintilla               2.13.3
r128gain                 1.0.6
rados                    2.0.0
ranger-fm                1.9.3
rbd                      2.0.0
readchar                 3.0.5
regex                    2021.11.10
reportlab                3.6.9
requests                 2.27.1
resolvelib               0.5.5
retrying                 1.3.3
rgw                      2.0.0
rsa                      4.7.2
s3transfer               0.6.0
screenkey                1.5
SecretStorage            3.3.1
setproctitle             1.2.3
setuptools               60.6.0
sgmllib3k                1.0.0
shellingham              1.4.0
shiboken6                6.3.0
shtab                    1.5.4
simplejson               3.17.6
six                      1.16.0
soupsieve                2.3.1
spinners                 0.0.24
stack-data               0.2.0
systemd-python           234
TBB                      0.2
td-watson                2.0.1
team                     1.0
termcolor                1.1.0
testtools                2.5.0
texttable                1.6.4
timew                    0.0.22
titlecase                2.3
tldr                     3.1.0
tmuxp                    1.10.0
todoist-python           8.1.3
tokenize-rt              4.2.1
toml                     0.10.2
tomli                    2.0.1
tqdm                     4.64.0
traitlets                5.2.2.post1
trash-cli                0.22.4.16
typeguard                2.13.3
typing-extensions        4.1.1
typing-inspect           0.7.1
udiskie                  2.4.2
ueberzug                 18.1.9
ufw                      0.36.1
unrardll                 0.1.5
uritemplate              3.0.1
urllib3                  1.26.9
userpath                 1.8.0
validate-email           1.3
wcwidth                  0.2.5
webencodings             0.5.1
websockets               8.1
Werkzeug                 2.1.1
wrapt                    1.13.3
wxPython                 4.0.7.post2
yarl                     1.7.2
zeroconf                 0.38.4
zipp                     3.8.0

For example, appdirs is in my pip list. So I guess it’s safe to do pacman -Rns python2-appdirs? However, fslint and fslint-gui are not in pip list. What should I do then?

❯ sudo pacman -Rns python2

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python2 breaks dependency 'python2' required by fslint
:: removing python2 breaks dependency 'python2' required by fslint-gui
:: removing python2 breaks dependency 'python2' required by python2-appdirs
:: removing python2 breaks dependency 'python2' required by python2-asn1crypto
:: removing python2 breaks dependency 'python2' required by python2-atomicwrites
:: removing python2 breaks dependency 'python2' required by python2-attrs
:: removing python2 breaks dependency 'python2' required by python2-backports
:: removing python2 breaks dependency 'python2' required by python2-cairo
:: removing python2 breaks dependency 'python2' required by python2-certifi
:: removing python2 breaks dependency 'python2' required by python2-colorama
:: removing python2 breaks dependency 'python2' required by python2-contextlib2
:: removing python2 breaks dependency 'python2' required by python2-distlib
:: removing python2 breaks dependency 'python2' required by python2-distro
:: removing python2 breaks dependency 'python2' required by python2-enum34
:: removing python2 breaks dependency 'python2' required by python2-funcsigs
:: removing python2 breaks dependency 'python2' required by python2-gobject2
:: removing python2 breaks dependency 'python2' required by python2-idna
:: removing python2 breaks dependency 'python2' required by python2-ipaddress
:: removing python2 breaks dependency 'python2' required by python2-linecache2
:: removing python2 breaks dependency 'python2' required by python2-mock
:: removing python2 breaks dependency 'python2' required by python2-msgpack
:: removing python2 breaks dependency 'python2' required by python2-nose
:: removing python2 breaks dependency 'python2' required by python2-numpy
:: removing python2 breaks dependency 'python2' required by python2-ordered-set
:: removing python2 breaks dependency 'python2' required by python2-ply
:: removing python2 breaks dependency 'python2' required by python2-progress
:: removing python2 breaks dependency 'python2' required by python2-py
:: removing python2 breaks dependency 'python2' required by python2-pyopenssl
:: removing python2 breaks dependency 'python2' required by python2-pyparsing
:: removing python2 breaks dependency 'python2' required by python2-requests
:: removing python2 breaks dependency 'python2' required by python2-resolvelib
:: removing python2 breaks dependency 'python2' required by python2-scandir
:: removing python2 breaks dependency 'python2' required by python2-six
:: removing python2 breaks dependency 'python2' required by python2-toml
:: removing python2 breaks dependency 'python2' required by python2-urllib3
:: removing python2 breaks dependency 'python2' required by python2-webencodings

So I can just do the following?

❯ sudo pacman -Rns python2 fslint fslint-gui python2-appdirs python2-asn1crypto python2-atomicwrites python2-attrs python2-backports python2-cairo python2-certifi python2-colorama python2-contextlib2 python2-distlib python2-distro python2-enum34 python2-funcsigs python2-gobject2 python2-idna python2-ipaddress python2-linecache2 python2-mock python2-msgpack python2-nose python2-numpy python2-ordered-set python2-ply python2-progress python2-py python2-pyopenssl python2-pyparsing python2-requests python2-resolvelib python2-scandir python2-six python2-toml python2-urllib3 python2-webencodings

I’m hesitant to do so because I don’t want to break my machine, so I’d like your opinion before taking any further actions.

I’ve learned my lesson: use virtual environment for Python modules and avoid global sudo pip install packages.

If I installed an AUR Python program, will it appear in pip list?

Is it better to have yay or pip to manage Python programs?

Thank you again!

Perhaps something like

pacman -Sii python2

Hello @linux-aarhus . Thank you for getting back to me.

❯ pacman -Sii python2
Repository      : extra
Name            : python2
Version         : 2.7.18-5
Description     : A high-level scripting language
Architecture    : x86_64
URL             : https://www.python.org/
Licenses        : PSF
Groups          : None
Provides        : None
Depends On      : bzip2  expat  gdbm  libffi  libnsl  libxcrypt  openssl  sqlite
                  zlib
Optional Deps   : tk: for IDLE
                  python2-setuptools
                  python2-pip
Required By     : cython2  mailman  obkey-gtk3  python2-appdirs  python2-dnspython
                  python2-ecdsa  python2-future  python2-idna  python2-ordered-set
                  python2-pycryptodome  python2-pygame-sdl2  python2-pyparsing
                  python2-six  python2-typing
Optional For    : ghidra
Conflicts With  : python<3
Replaces        : None
Download Size   : 13.57 MiB
Installed Size  : 76.84 MiB
Packager        : Felix Yan <felixonmars@archlinux.org>
Build Date      : Monday, October 11, 2021 AM06:29:32
MD5 Sum         : 06c6f5e3ed5b8f64fc0099c1d22b3374
SHA-256 Sum     : 1dc5b0ead944eb6d635835a0ee2e81ab6ff2115500bb250f5ad96a36b606c2cc
Signatures      : 786C63F330D7CB92

So I tried:

❯ sudo pacman -Rns python2-appdirs  python2-dnspython python2-ecdsa  python2-future  python2-idna  python2-ordered-set python2-pycryptodome  python2-pygame-sdl2  python2-pyparsing python2-six  python2-typing

error: target not found: python2-dnspython
error: target not found: python2-ecdsa
error: target not found: python2-future
error: target not found: python2-pycryptodome
error: target not found: python2-pygame-sdl2
error: target not found: python2-typing

So I tried remove the above non-existent targets:

❯ sudo pacman -Rns python2 python2-appdirs  python2-idna  python2-ordered-set python2-pyparsing python2-six

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python2 breaks dependency 'python2' required by fslint
:: removing python2 breaks dependency 'python2' required by fslint-gui
:: removing python2 breaks dependency 'python2' required by python2-asn1crypto
:: removing python2 breaks dependency 'python2' required by python2-atomicwrites
:: removing python2 breaks dependency 'python2' required by python2-attrs
:: removing python2 breaks dependency 'python2' required by python2-backports
:: removing python2 breaks dependency 'python2' required by python2-cairo
:: removing python2 breaks dependency 'python2' required by python2-certifi
:: removing python2 breaks dependency 'python2' required by python2-colorama
:: removing python2 breaks dependency 'python2' required by python2-contextlib2
:: removing python2-six breaks dependency 'python2-six' required by python2-cryptography
:: removing python2-idna breaks dependency 'python2-idna' required by python2-cryptography
:: removing python2 breaks dependency 'python2' required by python2-distlib
:: removing python2 breaks dependency 'python2' required by python2-distro
:: removing python2 breaks dependency 'python2' required by python2-enum34
:: removing python2 breaks dependency 'python2' required by python2-funcsigs
:: removing python2-six breaks dependency 'python2-six' required by python2-genty
:: removing python2 breaks dependency 'python2' required by python2-gobject2
:: removing python2-six breaks dependency 'python2-six' required by python2-html5lib
:: removing python2 breaks dependency 'python2' required by python2-ipaddress
:: removing python2 breaks dependency 'python2' required by python2-linecache2
:: removing python2 breaks dependency 'python2' required by python2-mock
:: removing python2-six breaks dependency 'python2-six' required by python2-mock
:: removing python2-six breaks dependency 'python2-six' required by python2-more-itertools
:: removing python2 breaks dependency 'python2' required by python2-msgpack
:: removing python2 breaks dependency 'python2' required by python2-nose
:: removing python2 breaks dependency 'python2' required by python2-numpy
:: removing python2-pyparsing breaks dependency 'python2-pyparsing' required by python2-packaging
:: removing python2-six breaks dependency 'python2-six' required by python2-packaging
:: removing python2-six breaks dependency 'python2-six' required by python2-pathlib2
:: removing python2-appdirs breaks dependency 'python2-appdirs' required by python2-pip
:: removing python2-six breaks dependency 'python2-six' required by python2-pip
:: removing python2 breaks dependency 'python2' required by python2-ply
:: removing python2 breaks dependency 'python2' required by python2-progress
:: removing python2 breaks dependency 'python2' required by python2-py
:: removing python2 breaks dependency 'python2' required by python2-pyopenssl
:: removing python2-six breaks dependency 'python2-six' required by python2-pyopenssl
:: removing python2 breaks dependency 'python2' required by python2-requests
:: removing python2-idna breaks dependency 'python2-idna' required by python2-requests
:: removing python2 breaks dependency 'python2' required by python2-resolvelib
:: removing python2-six breaks dependency 'python2-six' required by python2-retrying
:: removing python2 breaks dependency 'python2' required by python2-scandir
:: removing python2-appdirs breaks dependency 'python2-appdirs' required by python2-setuptools
:: removing python2-ordered-set breaks dependency 'python2-ordered-set' required by python2-setuptools
:: removing python2 breaks dependency 'python2' required by python2-toml
:: removing python2-six breaks dependency 'python2-six' required by python2-traceback2
:: removing python2-six breaks dependency 'python2-six' required by python2-unittest2
:: removing python2 breaks dependency 'python2' required by python2-urllib3
:: removing python2 breaks dependency 'python2' required by python2-webencodings

What is going on please?

$paru
[sudo] password for hin:
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 DEB_Arch_Extra          
:: Starting full system upgrade...
 there is nothing to do
:: Looking for AUR upgrades
:: Looking for devel upgrades
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...
:: packages not in the AUR: python2-cachecontrol  python2-distlib  python2-distro
    python2-pep517  python2-pip  python2-progress  python2-resolvelib
    python2-retrying
:: marked out of date: alsaequal  python2-asn1crypto  python2-urllib3
:: orphans: alsaequal

Aur (5) python2-chardet-4.0.0-3  python2-flaky-3.7.0-4
    python2-pretend-1.0.9-9  python2-pyopenssl-21.0.0-4  python2-toml-0.10.2-7

:: Proceed to review? [Y/n]: n
❯ pacman -Sii python2-chardet
error: package 'python2-chardet' was not found
❯ pacman -Sii python2-flaky
error: package 'python2-flaky' was not found
❯ pacman -Sii python2-pretend
error: package 'python2-pretend' was not found
❯ pacman -Sii python2-pyopenssl
error: package 'python2-pyopenssl' was not found
❯ pacman -Sii python2-toml
error: package 'python2-toml' was not found

How do I simply remove these five non-existent packages? Thanks!

It would greatly benefit you if you take your time and read archwiki (or manjaro if it exists) on pacman, python, system maintenance.

pacman -S* searches/looks in sync databases, not your locally installed packages.

1 Like
❯ yay
:: Searching AUR for updates...
 -> python2-contextlib2: local (0.6.0.post1-3) is newer than AUR (0.6.0.post1-1)

Let’s say you want to remove python2-contextlib2:

❯ yay -Rns python2-contextlib2
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python2-contextlib2 breaks dependency 'python2-contextlib2' required by python2-importlib-metadata
:: removing python2-contextlib2 breaks dependency 'python2-contextlib2' required by python2-zipp
 -> exit status 1

Keep adding the dependency until you can remove the package:

❯ yay -Rns python2-contextlib2 python2-zipp python2-pep517 python2-importlib-metadata python2-pytest python2-pluggy python2-pytest-runner
checking dependencies...

Packages (18) python2-atomicwrites-1.4.0-7  python2-attrs-21.4.0-1
              python2-backports-1.1-2
              python2-backports.functools_lru_cache-1.6.4-3
              python2-configparser-4.0.2-3  python2-more-itertools-5.0.0-3
              python2-pathlib2-2.3.7.post1-2  python2-py-1.11.0-2
              python2-scandir-1.10.0-8  python2-toml-0.10.2-3
              python2-wcwidth-0.2.5-6  python2-contextlib2-0.6.0.post1-3
              python2-importlib-metadata-2.1.3-2  python2-pep517-0.11.0-1
              python2-pluggy-0.13.1-9  python2-pytest-4.6.11-1
              python2-pytest-runner-5.2-5  python2-zipp-1:1.1.1-1

Total Removed Size:  6.08 MiB

:: Do you want to remove these packages? [Y/n] Y
:: Processing package changes...
( 1/18) removing python2-pytest-runner             [--------------------------] 100%
( 2/18) removing python2-pytest                    [--------------------------] 100%
( 3/18) removing python2-wcwidth                   [--------------------------] 100%
( 4/18) removing python2-backports.functools_l...  [--------------------------] 100%
( 5/18) removing python2-py                        [--------------------------] 100%
( 6/18) removing python2-more-itertools            [--------------------------] 100%
( 7/18) removing python2-attrs                     [--------------------------] 100%
( 8/18) removing python2-atomicwrites              [--------------------------] 100%
( 9/18) removing python2-pluggy                    [--------------------------] 100%
(10/18) removing python2-pep517                    [--------------------------] 100%
(11/18) removing python2-toml                      [--------------------------] 100%
(12/18) removing python2-importlib-metadata        [--------------------------] 100%
(13/18) removing python2-pathlib2                  [--------------------------] 100%
(14/18) removing python2-scandir                   [--------------------------] 100%
(15/18) removing python2-configparser              [--------------------------] 100%
(16/18) removing python2-backports                 [--------------------------] 100%
(17/18) removing python2-zipp                      [--------------------------] 100%
(18/18) removing python2-contextlib2               [--------------------------] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...

Thanks guys!

sudo pacman -Rns cython2  mailman  obkey-gtk3  python2-appdirs  python2-dnspython \
              python2-ecdsa  python2-future  python2-idna  python2-ordered-set \
              python2-pycryptodome  python2-pygame-sdl2  python2-pyparsing \
              python2-six  python2-typing \
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.