I have a script called test.py
that I am running in a step function. The code for this script is below:
def install(package):
subprocess.call(['sudo', sys.executable, '-m', 'pip', 'install', package])
install('boto3')
install('Cython') # dependent package of pandas
install('numpy') # dependent package of pandas
install('python-dateutil') # dependent package of pandas
install('pytz') # dependent package of pandas
install('pandas') # dependent package of pandas
import boto3
import pandas
When I run the state machine I get the following error:
"Id": "s-BFGSEXELRRZZW",
"Name": "Test",
"Status": {
"State": "CANCELLED",
"StateChangeReason": {
"Message": "Job terminated"
},
"Timeline": {
"CreationDateTime": 1628382090869,
"StartDateTime": 1628382113695
}
}
}
I suspect the install('pandas')
is causing the error. Is there some other way I should install pandas
if I want to use this methodology? Should the order of installing the dependent packages be changed?