I have a python script that I would like to run from a terminal attached to my sagemaker notebook instance. I'm using the provided Data Science 3.0 image on a t3.medium.
My process:
- Start the notebook instance
- Launch terminal using icon in notebook toolbar
- Activate conda environment (base)
- Run script with:
python myscript.py arg1
At this point I receive this error:
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/conda/lib/python3.10/site-packages/pandas/_libs/window/aggregations.cpython-310-x86_64-linux-gnu.so)
The above error stems from a simple import sagemaker
statement
The import runs perfectly fine in the notebook, however in the terminal I get the error. From what I can tell the kernel and system path are both identical. Running !python myscript.py arg1
from inside the notebook also returns the same error. What am I missing?
Hi! So the kernels are the same, however the paths are in fact different. The notebook has the following paths that the terminal is missing:
/opt/amazon/bin:/tmp/miniconda3/condabin:/tmp/anaconda3/condabin:/tmp/miniconda2/condabin:/tmp/anaconda2/condabin:/tmp/mambaforge/condabin
I tried appending the above paths to the terminal system path, however I receive the same error. In fact, the above directories do not seem to exist within the terminal.