How to setup bamboolib on Amazon SageMaker
Go to Notebook → Create lifecycle configuration and create a lifecycle configuration called
install-bamboolib. Copy paste the script below:
sudo -u ec2-user -i <<'EOF'
# This will affect only the Jupyter kernel called "conda_python3"
# see <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-lifecycle-config-install.html>
source activate python3
pip install bamboolib
python -m bamboolib install_nbextensions
Go to Notebook → Notebook Instances and create a notebook instance. Make sure to add the
install-bambooliblifecycle configuration under Lifecycle configuration
Click on "Open Jupyter" in order to start a Jupyter Notebook. Please make sure to create a Notebook with the
conda_python3kernel. Then run the following code to test bamboolib:
import bamboolib as bam
df = bam.get_sales_df()
SageMaker uses JupyterLab version 1.2.18, which is causing some compatibility issues with bamboolib. If you want us to provide compatibility for SageMaker JupyterLab, please send us an email.