If you are using a Jupyter Notebook enviroment, use !pip instead pip as you want to execute pip as a shell command and install s3fs directly into the kernel.
!pip
pip
s3fs
!pip install s3fs
Be sure to restart the kernel after installation.