I wanted to update pandas version in ‘conda-python3’ in SageMaker, I’ve followed the steps in this page, and linked the new configuration to my instance, CloudWatch log shows me the script has been executed successfully, but when I restart my instance and print out the panda version, it’s still showing the old version 0.24.2, I don’t understand why?
This is the script in the lifecycle configuration:
JavaScript
x
11
11
1
#!/bin/bash
2
sudo -u ec2-user -i <<'EOF'
3
4
pip install pandas
5
6
conda update pandas
7
8
source deactivate
9
10
EOF
11
Advertisement
Answer
You are not activating any conda environment such as python3.
JavaScript
1
14
14
1
#!/bin/bash
2
sudo -u ec2-user -i <<'EOF'
3
4
# This will affect only the Jupyter kernel called "conda_python3".
5
source activate python3
6
7
pip install pandas
8
9
conda update pandas
10
11
source deactivate
12
13
EOF
14