To get rid of this error you need to need to install the security package below is the command to install security package:-
$ pip install requests[security]
If you're using Linux(Ubuntu) then you can use the following command to install the security package:
$ apt-get install libffi-dev libssl-dev