I am using AWS Cloud9 as my IDE.
import boto3
import pandas as pd
# import s3fs
# s3_ob=boto3.resource('s3',aws_access_key_id="xxxxxxxxxx",aws_secret_access_key="xxxxxxxxxxxx")
client=boto3.client('s3')
path="s3://xxxxxx/FL_insurance_sample.csv"
df=pd.read_csv(path)
# df.head()
print(df)`
While I am able to get the output CSV file in Pycharm, when I use the same code in Cloud9 IDE on AWS I get the error mentioned in title.
I have installed the S3Fs using the pip install S3Fs and when I do "pip list" it does give me the list installed which contains S3Fs so I am confused, why am I getting this error when the module is already installed and it shows in the pip list, and I also tried uncommenting the import S3Fs and still the same error is there.
Please help me.
pip3 install s3fs --user
. I assume you are using latest version of Python 3, so you should be usingpip3
instead. Furthermore, check that you have activated the conda environment correctly by checkingconda env list
will show you the list of environments you have and the one with * is the currently active one – Asthenopia