When rosdep is python2 version, it doesn't install python3 version even for python3-* dep keys?
I'm asking for clarification. Is my following understanding correct?
What I'm seeing is as in the title. On my very example,
- Ubuntu 18.04
python-rosdep
(not python3)- Ran
rosdep install
against a pkg that haspython3-inputimeout-pip
key. A pkginputimeout
seems installed viapip
butpython3
failed to import that.
If this is expected, it makes sense from developer's perspective. It's just confusing from an operator's point of view.
Just as a proof, take python3-inputimeout-pip
rosdep key as an example, here's a proof for what I'm seeing.
$ docker run -it ros:melodic-ros-base bash
root@52f5cb8c7b45:/# apt-cache policy python-rosdep
python-rosdep:
Installed: 0.21.0-1
Candidate: 0.21.0-1
root@52f5cb8c7b45:/# apt-cache policy python3-rosdep
python3-rosdep:
Installed: (none)
Candidate: (none)
root@52f5cb8c7b45:/# mkdir -p /cws/src && cd /cws/src && catkin_create_pkg testes python3-inputimeout-pip
root@52f5cb8c7b45:/cws# cat src/testes/package.xml |grep -i depend
:
<build_depend>python3-inputimeout-pip</build_depend>
<build_export_depend>python3-inputimeout-pip</build_export_depend>
<exec_depend>python3-inputimeout-pip</exec_depend>
root@52f5cb8c7b45:/cws/src# cd .. && apt update && rosdep update && apt install -y python-pip && rosdep install -r -y --from-paths src --ignore-src
executing command [pip2 install -U inputimeout]
Collecting inputimeout
Downloading https://files.pythonhosted.org/packages/b3/57/420f8181c31c87eab5815af006ea7c6053e965465d9f52ddf4078ffd7c4a/inputimeout-0.1.1.tar.gz
Building wheels for collected packages: inputimeout
Running setup.py bdist_wheel for inputimeout ... done
Stored in directory: /root/.cache/pip/wheels/17/6d/cf/e12a540e76cbcbe9b112ddf1a8fc43a9fb74f623f4f3b75962
Successfully built inputimeout
root@52f5cb8c7b45:/cws# python --version
Python 2.7.17
root@52f5cb8c7b45:/cws# python -c "from inputimeout import inputimeout, TimeoutOccurred"
root@52f5cb8c7b45:/cws#
root@52f5cb8c7b45:/cws# python3 -c "from inputimeout import inputimeout, TimeoutOccurred"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'inputimeout'
Asked by 130s on 2021-11-12 12:22:40 UTC
Comments