Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add websockets as pip install for humble rmf_demos #272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Briancbn
Copy link

Signed-off-by: Chen Bainian chenbn@artc.a-star.edu.sg

Bug fix

Fixed bug

As mentioned in open-rmf/rmf_demos#169

Fix applied

As mentioned in comment open-rmf/rmf_demos#169 (comment)

Signed-off-by: Chen Bainian <chenbn@artc.a-star.edu.sg>
@@ -69,7 +69,7 @@ Install all non-ROS dependencies of OpenRMF packages,
sudo apt update && sudo apt install \
git cmake python3-vcstool curl \
-y
python3 -m pip install flask-socketio fastapi uvicorn datamodel_code_generator
python3 -m pip install flask-socketio fastapi websockets uvicorn datamodel_code_generator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user had previously installed websockts as an Ubuntu system package via apt install python3-websockets, this pip install command will not install the latest version of websockts v10.4.

yadu@yadu:~$ dpkg -l | grep python3-websockets
ii  python3-websockets                                 9.1-1                                   all          implementation of the WebSocket Protocol (RFC 6455)
yadu@yadu:~$ python3 -m pip install websockets
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: websockets in /usr/lib/python3/dist-packages (9.1)

So I think the instructions should be updated such that the apt version is purged first if preset and then installed via pip. ie add this line before install all the packages via pip.

sudo apt purge python3-websockets

but this would also require us to remove this line from the package.xml of rmf_demos_panel. Else, when running the rosdep command, it will also install python3-websockets.

Copy link
Author

@Briancbn Briancbn Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yadunund How about pip install -U it should upgrade the packages? I can verify that it doesn't require purging the python3-websockets installation, since PyPI installation should take precedent.

Also I checked the version using the following command instead, since dpkg only shows .deb

python3 -c "import websockets; print(websockets.__version__)"

Copy link
Author

@Briancbn Briancbn Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yadunund pinging again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants