Command ‘swig’ failed with exit status 1

I am using Streamlit Sharing.

With the following requirements.txt, it worked fine.
streamlit==0.66.0
pandas==0.25.3
numpy==1.18.5
scikit-learn==0.22.2.post1
joblib==0.17.0
keras==2.4.3
matplotlib==3.3.2
h5py==2.10.0
tensorflow==2.3.1

But if I add auto-sklearn==0.10.0 to the requirements.txt, I got error: command ‘swig’ failed with exit status 1. Please see attached error.png.

Below is requirements.txt which did not work:
streamlit==0.66.0
pandas==0.25.3
numpy==1.18.5
scikit-learn==0.22.2.post1
auto-sklearn==0.10.0
joblib==0.17.0
keras==2.4.3
matplotlib==3.3.2
h5py==2.10.0
tensorflow==2.3.1

I have tested the codes ( NTUT-AutoML-v1.1.py LSTM_codes.py ) both in colab and ubuntu. It all works fine including auto-sklearn. But not work in Streamlit share!

Thanks once again. You guys are doing a great job.

Hi @Steve_Chen -

swig is a compiler, which is usually installed at the system level. Can you try and add a packages.txt file to your repository with the value of swig on a line? Here’s an example file:

Best,
Randy

I got it work. You guys are genius.
-Steve-

1 Like