Can’t install djoser

PS C:\Users\CHARLES\Desktop\PROJECTS\DJANGO PRACTICE\constr testing> pip install djoser
Collecting djoser
Downloading djoser-2.2.2-py3-none-any.whl.metadata (5.8 kB)
Requirement already satisfied: django>=3.0.0 in c:/msys64/mingw64/lib/python3.11/site-packages (from djoser) (5.0.2)
Collecting django-templated-mail<2.0.0,>=1.1.1 (from djoser)
Downloading django_templated_mail-1.1.1-py3-none-any.whl (4.7 kB)
Collecting django
Downloading cryptography-42.0.5.tar.gz (671 kB)
---------------------------------------- 671.0/671.0 kB 422.8 kB/s eta 0:00:00
Installing build dependencies … error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [57 lines of output]
Collecting setuptools>=61.0.0
Using cached setuptools-69.1.1-py3-none-any.whl.metadata (6.2 kB)
Collecting wheel
Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Collecting cffi>=1.12
Using cached cffi-1.16.0.tar.gz (512 kB)
Installing build dependencies: started
Installing build dependencies: finished with status ‘done’
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status ‘error’
error: subprocess-exited-with-error

    Getting requirements to build wheel did not run successfully.
    exit code: 1

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
 
  Getting requirements to build wheel did not run successfully.
  exit code: 1
 
  See above for output.
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
 
  [notice] A new release of pip is available: 23.3.2 -> 24.0
  [notice] To update, run: python.exe -m pip install --upgrade pip
  [end of output]

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

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

PLS HELP ME IT DOES SAME FOR PIPENV MYSQLCLIENT POETRY AND DJOSER

1 Like

What OS are you running? This looks like the cryptography package had to be built from source because it was not available precompiled for your platform. Building cryptography is a bit complex, requiring working C and Rust compilers in particular.

Please I’m running windows os

According to Installation — Cryptography 43.0.0.dev1 documentation, you may need to upgrade pip.

I’ve done that severally today. Even mysqlclient refused to install. Djoser refused. Additional pipenv also refused. I said let me try poetry and sane things happened. But Django installed, python also, also rest framework installed