Add websockets as pip install for humble rmf_demos#272
Add websockets as pip install for humble rmf_demos#272Briancbn wants to merge 1 commit intoopen-rmf:mainfrom
Conversation
Signed-off-by: Chen Bainian <chenbn@artc.a-star.edu.sg>
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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__)"
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)