Python on the v5 is meant for simple programs so you won’t be able to use external libraries directly in your code. Instead you need to download the libraries onto a mini SD card and insert that into the brain, then you can access it in your program. However take this with a grain of salt as I have not tried it myself, just heard about it from reading previous forum posts.
This JPearman’s post shows how to import a Python library onto the brain using SD card: