No module named '_argon2_cffi_bindings'

172 views
Skip to first unread message

Denis

unread,
Apr 1, 2023, 2:46:19 AM4/1/23
to sage-devel

I always install Sage from source on four up-to-date Debian systems, two PCs and two laptops. Passing from 9.7 to 9.8, something went wrong with one of the laptop installations. It compiles normally, and I get the login page with sage --notebook=jupyter, but when I type in my password, I get 500 Internal Server Error in the browser, and  the terminal in which I started the notebook gives the error messages:

[I 08:21:01.644 NotebookApp] 302 GET /tree (127.0.0.1) 0.510000ms
[E 08:21:12.719 NotebookApp] Uncaught exception POST /login?next=%2Ftree (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/login?next=%2Ftree', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/tornado/web.py", line 1711, in _execute
        result = method(*self.path_args, **self.path_kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py", line 84, in post
        if self.passwd_check(self.hashed_password, typed_password) and not new_password:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py", line 75, in passwd_check
        return passwd_check(a, b)
               ^^^^^^^^^^^^^^^^^^
      File "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/security.py", line 108, in passwd_check
        import argon2
      File "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/__init__.py", line 7, in <module>
        from . import exceptions, low_level, profiles
      File "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/low_level.py", line 15, in <module>
        from _argon2_cffi_bindings import ffi, lib
    ModuleNotFoundError: No module named '_argon2_cffi_bindings'
[E 08:21:12.724 NotebookApp] {
      "Host": "localhost:8888",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
      "Referer": "http://localhost:8888/login?next=%2Ftree",
      "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
    }
[E 08:21:12.724 NotebookApp] 500 POST /login?next=%2Ftree (127.0.0.1) 5.910000ms referer=http://localhost:8888/login?next=%2Ftree

I have tried to configure --without-system-python3 but no luck. Version 9.7 on the same laptop compiled with the system python and works normally. The only thing I did differently with the laptop is that I always installed all the packages recommended by configure, but that was also the case for 9.7, so possibly some specific package got updated between the two versions which broke the installation. I depend on Sage in my daily work so I am reluctant to try to break the three working systems.

Any ideas?

Cheers,

Denis

Matthias Koeppe

unread,
Apr 1, 2023, 2:55:08 AM4/1/23
to sage-devel
Try if "./sage -pip install argon2-cffi-bindings" fixes this problem for you.

Denis

unread,
Apr 1, 2023, 12:06:47 PM4/1/23
to sage-devel
It worked, thank you very much! I am mystified, though.

Denis

Matthias Koeppe

unread,
Apr 1, 2023, 12:17:06 PM4/1/23
to sage-devel
I made a mistake when upgrading a package - a dependency is missing.

The error only appears when a jupyter configuration with passwords is used, which appears to be rare.

Denis

unread,
Apr 1, 2023, 12:57:24 PM4/1/23
to sage-devel
So it may be that in the three upgrades that worked the dependency was satisfied by accident. I can check if it is of any interest now. Thanks for the help again.

Denis

Matthias Koeppe

unread,
Apr 1, 2023, 2:32:33 PM4/1/23
to sage-devel
No, I think it's a new dependency that was introduced in a recent version of "argon2-cffi".
Reply all
Reply to author
Forward
0 new messages