Further information re pip and python3 problem

967 views
Skip to first unread message

Phil

unread,
Aug 26, 2022, 6:41:53 AM8/26/22
to wxpytho...@googlegroups.com
After I pressed the "send" key I thought that maybe I have an old
version of pip so I upgraded it and the error message shows that I need
to install the attrdict module which I have done and now I have a new
error message:

      ImportError: cannot import name 'Mapping' from 'collections'
(/usr/lib/python3.10/collections/__init__.py)

My flaky Internet connection has dropped out so I cannot proceed any
further tonight. I might be able to send this e-mail.

--

Regards,
Phil

Anders Munch

unread,
Aug 26, 2022, 6:51:07 AM8/26/22
to wxpytho...@googlegroups.com
Phil wrote:
>       ImportError: cannot import name 'Mapping' from 'collections'
> (/usr/lib/python3.10/collections/__init__.py)

This is what Python 3.8 has to say about that issue:

$ py -3.8 -c "from collections import Mapping"
<string>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

One of your packages needs an upgrade to be compatible with Python 3.10.
Which one it is will probably be apparent from the rest of your traceback, which you didn't include.

regards, Anders
.

Phil

unread,
Aug 26, 2022, 7:13:25 AM8/26/22
to wxpytho...@googlegroups.com
Thank you Steve and Anders.

The package for Ubuntu is pretty old Steve, older than the previous
version of WxPython that I had installed with pip.

On 26/8/22 20:50, Anders Munch wrote:
>
> This is what Python 3.8 has to say about that issue:
>
> $ py -3.8 -c "from collections import Mapping"
> <string>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
>
> One of your packages needs an upgrade to be compatible with Python 3.10.
> Which one it is will probably be apparent from the rest of your traceback, which you didn't include.
My Internet connection picked up for awhile and I did read something
about ABC. Here is the complete error message and I have installed
attrdict.

Defaulting to user installation because normal site-packages is not
writeable
Collecting wxPython==4.2.0
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File
"/tmp/pip-install-pni3i4v8/wxpython_f0b58a701727485f89632f386b537e44/setup.py",
line 27, in <module>
          from buildtools.config import Config, msg, opj, runcmd,
canGetSOName, getSOName
        File
"/tmp/pip-install-pni3i4v8/wxpython_f0b58a701727485f89632f386b537e44/buildtools/config.py",
line 30, in <module>
          from attrdict import AttrDict
        File
"/home/phil/.local/lib/python3.10/site-packages/attrdict/__init__.py",
line 5, in <module>
          from attrdict.mapping import AttrMap
        File
"/home/phil/.local/lib/python3.10/site-packages/attrdict/mapping.py",
line 4, in <module>
          from collections import Mapping
      ImportError: cannot import name 'Mapping' from 'collections'
(/usr/lib/python3.10/collections/__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a
problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

--

Regards,
Phil

Phil

unread,
Aug 26, 2022, 7:49:25 AM8/26/22
to wxpytho...@googlegroups.com

On 26/8/22 20:50, Anders Munch wrote:

I uninstalled attrdict and instead installed attrdict3 and I see I now
need to install a few more packages. A job for tomorrow, if I have an
Internet connection.

--

Regards,
Phil

Reply all
Reply to author
Forward
0 new messages