I am setting up my SITL for uni research project on my Windows PC, so far I’ve followed the instructions from the ArduPilot website, until I got stuck on with this error when trying to put this command in Cygwin64:
…/Tools/autotest/sim_vehicle.py --map --console
The Cygwin64 answer:
$ …/Tools/autotest/sim_vehicle.py --map --console
Traceback (most recent call last):
File “…/Tools/autotest/sim_vehicle.py”, line 30, in
from pymavlink import mavextra
ModuleNotFoundError: No module named ‘pymavlink’
I’ve already tried updating MAVLink but it didn’t do any change. I also noticed that few people had the same problem as me but I didn’t find proper solution or answer for this problem since I am an ArduPilot newbie.
So could someone please tell me what to do? I’m clueless and I need it solved as soon as possible. Thanks everyone for help
That means the pmavlink package is not installed within the Cywgin environment.
To get a list of all installed Python packages:
pip list. Then check if pymavlink is there. If not, use
pip install pymavlink --user to install.
I just checked & I have pymavlink installed:
$ pip list
Did you use the power shell script provided in the code to do the install for you? I just tested it and it runs fine.
which pip and
which python to see where python is installed. There might be a conflict somewhere.
$ which pip
$ which python
looks like it is in the same bin, so I guess it’s also alright.
No I haven’t, can you tell me more about that please?
I am installing it manually like the web instructions says so.
At the very top of https://ardupilot.org/dev/docs/building-setup-windows-cygwin.html there is this information:
There is a pre-built script at /ardupilot/Tools/environment_install/install-prereqs-windows.ps1 that will automatically perform all of the below steps.
so I re-installed & still got the error, the sim_vehicle.py is in the right folder, pymavlink is also there. I even consulted it with my firend who knows working in python and still we didn’t find where’s the problem. Please help.
Hello there Peter. Did you find any solution for this problem?