Deployment Error about rosbag

I am trying to deploy my app to the web but encountered an error:

ERROR: Could not find a version that satisfies the requirement rosbag (from versions: none)

My requirement file is generated by pipreqs but it seems not workable. How can I fix this error?

Hi @RickLin, welcome to the Streamlit Community! :wave:

Could you share a link to your repo with the requirements file?

AFAIK, rosbag is not available on PyPI. Did you mean rosbags?

Thanks for your quick response.
As for the link of the requirement file, try this one: RiskVIz_Momenta/requirements.txt at main · RickLin616/RiskVIz_Momenta · GitHub.
As for the PyPI, I use rosbag instead of rosbags. The link which offers the detailed information about rosbag API is also attached for your convenience. wiki.ros.org/rosbag/Code API

rosbag is not a Python package available on PyPI and as such cannot be installed via requirements.txt.

Rosbag and rosbags are two different libraries.

How do you install Rosbag locally?

Just “pip install rosbag”. BTW I use ubuntu.

That’s curious :thinking: Could you try pip uninstall rosbag followed by

pip install rosbag --no-cache-dir

and share a screenshot of your terminal logs?

rosbag does not exist on PyPI and should be impossible to simply pip install rosbag:

https://pypi.org/project/rosbag/

Yep, a “strange” library

Thanks for your reply. I will try to learn rosbags and use it to replace rosbag in my file.

1 Like

My bad. I installed it with
‘’’
pip install --extra-index-url https://rospypi.github.io/simple/ rospy rosbag
‘’’
It is not a standard python library. So how can i fix it in my requirement file?

Hi @RickLin

Thank you for clarifying that rosbag uses an index other than PyPI! Here’s what your requirements.txt should contain:

joblib==1.1.0
matplotlib==3.5.1
numpy==1.21.5
pandas==1.4.2
--extra-index-url https://rospypi.github.io/simple/
rospy
rosbag
scikit_learn==1.1.2
setuptools==59.6.0
Shapely==1.8.2
streamlit==1.12.0
torch==1.12.0
torchvision==0.13.0
tqdm==4.64.0
1 Like

Received. Thanks from the bottom of my heart.

1 Like