8go / matrix-commander

simple but convenient CLI-based Matrix client app for sending and receiving
GNU General Public License v3.0
549 stars 59 forks source link

No module named 'attrs' #164

Closed hiiamboris closed 1 week ago

hiiamboris commented 8 months ago

First run after pip3 install matrix-commander on Ubuntu 20.04.6 LTS:

Traceback (most recent call last):
  File "/usr/local/bin/matrix-commander", line 5, in <module>
    from matrix_commander import main
  File "/usr/local/lib/python3.8/dist-packages/matrix_commander/__init__.py", line 1, in <module>
    from .matrix_commander import main
  File "/usr/local/lib/python3.8/dist-packages/matrix_commander/matrix_commander.py", line 51, in <module>
    from nio import (AsyncClient, AsyncClientConfig, ContentRepositoryConfigError,
  File "/usr/local/lib/python3.8/dist-packages/nio/__init__.py", line 9, in <module>
    from .client import *
  File "/usr/local/lib/python3.8/dist-packages/nio/client/__init__.py", line 3, in <module>
    from .base_client import Client, ClientConfig
  File "/usr/local/lib/python3.8/dist-packages/nio/client/base_client.py", line 37, in <module>
    from ..crypto import ENCRYPTION_ENABLED, DeviceStore, OutgoingKeyRequest
  File "/usr/local/lib/python3.8/dist-packages/nio/crypto/__init__.py", line 34, in <module>
    from .key_request import OutgoingKeyRequest
  File "/usr/local/lib/python3.8/dist-packages/nio/crypto/key_request.py", line 20, in <module>
    from ..responses import RoomKeyRequestResponse
  File "/usr/local/lib/python3.8/dist-packages/nio/responses.py", line 25, in <module>
    from jsonschema.exceptions import SchemaError, ValidationError
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/__init__.py", line 13, in <module>
    from jsonschema._format import FormatChecker
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/_format.py", line 11, in <module>
    from jsonschema.exceptions import FormatError
  File "/usr/local/lib/python3.8/dist-packages/jsonschema/exceptions.py", line 15, in <module>
    from attrs import define
ModuleNotFoundError: No module named 'attrs'

When I pip3 install attrs it says:

Requirement already satisfied: attrs in /usr/lib/python3/dist-packages (19.3.0)

I guess I should get used that if it's in Python it won't work :) How do I fix this?

8go commented 4 months ago

A few comments:

1) This problem sounds familiar to me. I think I have seen and solved this a few years back. But now I cannot remember how I solved it in the setup.

2) On Ubuntu 22.04 LTS with Python 3.10 and attrs 23.2 it works fine.

3) Your set-up is old, Ubuntu 20.04. Maybe you can try on another machine with a newer OS?

Do any other users have any insights? Who is using Ubuntu 20.04? Please chime in!

8go commented 4 months ago

You might want to google things related to your error:

File "/usr/local/lib/python3.8/dist-packages/jsonschema/exceptions.py", line 15, in from attrs import define ModuleNotFoundError: No module named 'attrs'

8go commented 1 week ago

I am closing this issue because it is old. Reopen if needed.