django-allauthインストールエラー

 

動かして学ぶ!Python Django開発入門】Chapter 10 『Djangoに認証機能を追加する』で django-allauth のインストール時にエラー発生した。

 

実行コマンド:

pip install django-allauth

エラー:

Failed to build cryptography

ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

 

Warning:

WARNING: You are using pip version 20.2.3; however, version 21.3.1 is available.

You should consider upgrading via the '/Users/<machinname>/venv_private_diary/bin/python3 -m pip install --upgrade pip' command.

 

pip をアップグレードしてみると 21.3.1 へのアップグレードに成功。

そこから再度 allauth をインストールしてみたところエラーは解消しました。authall インストール成功です。

 

 

Collecting pycparser

  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)

Using legacy 'setup.py install' for django-allauth, since package 'wheel' is not installed.

Installing collected packages: pycparser, urllib3, idna, charset-normalizer, cffi, certifi, requests, pyjwt, oauthlib, defusedxml, cryptography, requests-oauthlib, python3-openid, django-allauth

    Running setup.py install for django-allauth ... done

Successfully installed certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.7 cryptography-35.0.0 defusedxml-0.7.1 django-allauth-0.45.0 idna-3.3 oauthlib-3.1.1 pycparser-2.20 pyjwt-2.3.0 python3-openid-3.2.0 requests-2.26.0 requests-oauthlib-1.3.0 urllib3-1.26.7