scikit bring your own - error in training model
Hello @djarpin
I am trying to run the scikit BYO without changing anything and I get this error when I am trying to fit the model. Cloudwatch logs show just "/usr/bin/env: 'python\r': No such file or directory"

Can you please help?
I downloaded the code from sagemaker examples and that worked!
@arjunpn90 - Hi, I'm facing the same issue, can you please elaborate your above solution.
Hi @madhurkgp , The python version of the pickled code and python version in docker image should be same. I built the model using python 3.6 and version in docker image was 2.7 and the issue was resolved when the python version in docker image was changed to 3.6 as well.
Hello, I am facing the same issue. I tried a different docker file, and even the image used in the sci-kit learn tutorial:
Can anyone provide any help? I used a different docker file recently (based on Amazon Linux 1) and it worked properly. So I really don't know what is going on
To any people that may be suffering in the future:
The problem is that the python script that contains the shelbeg command
#!/usr/bin/env python
Was written with the Windows end of life configuration (CRLF) and is being executed with the Unix end of life configuration (LF) in Sagemaker.
Convert that file to the LF format and everything will work.
Thank me later.
@jamerico Thank you so much. It happened to me, and I followed your solution. Here iss what I've done:
- Install dos2unix.
- Convert wsgi.py, train, serve, predictor.py from CRLF to LF.