B007
B007

Reputation: 9

sagemaker-sklearn-container 1.0 requires pandas==0.25.*, but you have pandas 1.3.5 which is incompatible

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behavior is the source of the following dependency conflicts.

sagemaker-sklearn-container 1.0 requires pandas==0.25.*, but you have pandas 1.3.5 which is incompatible.

I am running my notebook locally under python virtual machine , and I have pandas 0.25.3 version but when I am training the model on sagemaker , it shows an error that amazon scikitlearn container 1.0 using 0.25.* but I have 1.3.5,

I don't understand how can I solve it , though locally I have 0.25.3

Upvotes: 1

Views: 892

Answers (1)

Abdelrahman Maharek
Abdelrahman Maharek

Reputation: 862

As a workaround, You can use you training script to uninstall and install the required version of Pandas.

For example

import os 
os.execute('pip ...')

To speed up experimenting this workaround, you can use SageMaker local mode.

You can apply the same workaround while deploying the model by using the inference.py script.

Otherwise, you can extend the scikit-learn container and install the desired version of Pandas. The example here explains how to extend the pre-built containers.

Upvotes: 1

Related Questions