Step 4: Remove the Old Virtual Environment Your existing environment was created using the previous Python version. Go to: E: cd \sagemaker Remove: rmdir /s /q sm-env Step 5: Create New Python 3.11 Virtual Environment Create using Python 3.11 explicitly: py -3.11 -m venv sm-env Activate: sm-env\Scripts\activate Your prompt should show: (sm-env) E:\sagemaker> Step 6: Verify Virtual Environment Python Run: python --version Expected: Python 3.11.x Check location: where python Expected first entry: E:\sagemaker\sm-env\Scripts\python.exe Step 7: Upgrade Build Tools Inside (sm-env): python -m pip install --upgrade pip setuptools wheel Step 8: Install SageMaker SDK Now install: pip install sagemaker==2.243.0 Verify: pip show sagemaker Expected: Name: sagemaker Version: 2.243.0 Location: E:\sagemaker\sm-env\Lib\site-packages Test: python Then: import sagemaker print(sagemaker.__version__) Expected: 2.243.0 Step 9: Install Your EC2 Patch Compliance ML Packages After SageMaker works: pip install pandas numpy scikit-learn xgboost boto3 openpyxl jupyter Your final environment: E:\sagemaker | +-- sm-env (Python 3.11) | +-- ec2-patch-ml | +-- pipeline.py +-- processing.py +-- train.py +-- evaluate.py This setup will be suitable for building your EC2 Patch Compliance Prediction SageMaker Pipeline.