Hey guys! I exactly went through the Cygwin Download and SITL but I get the error no module named Pymavlink. I did Pip install pymavlink/ python3 -m pip install pymavlink/pipwin install pymavlink( I was desperate lol). Any advices
At which stage you get that error message?
Send us the complete command window output (as text or screenshot).
Did you get any error when installing pymavlink?
Okay. Here is the cygwin terminal:
I get the error when: …/Tools/autotest/sim_vehicle.py --map --console
Do you get the same error message when you do the below commands, try them.
- python -m pip install pymavlink
- cd Tools/autotest
- python sim_vehicle.py --map --console
cd Tools/autotest: No Such File or directory
I assumed you are at the ardupilot directory.
Since you are out of the arducopter directory you might need to do
python sim_vehicle.py -v ArduCopter --map --console
Hello I am getting the same error. I am not since why since I can see the module named pymavlink. It is located under /modules/mavlink/. Any help would be appreciated!
Had exactly the same issue, decided to run SITL on a VM running Ubuntu instead, works perfectly.
on running this command i am gettting python: can’t open file ‘sim_vehicle.py’: [Errno 2] No such file or directory
this error help me out
I am still getting the same error as:
Traceback (most recent call last):
File “…/Tools/autotest/sim_vehicle.py”, line 30, in
from pymavlink import mavextra
ModuleNotFoundError: No module named ‘pymavlink’
I tried to install pymavlink separately and I got this error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv = ‘"’"’/tmp/pip-install-v1wnz5ax/lxml_5990454f613d4e968eeaed9d73812175/setup.py’"’"’; file=’"’"’/tmp/pip-install-v1wnz5ax/lxml_5990454f613d4e968eeaed9d73812175/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-gqvggv1h/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.7m/lxml
Complete output (86 lines):
These pymavlink issues are coming up with many people on the native windows build. Check
Unable to finish setting up SITL on windows - General - ArduPilot Discourse
Always worth a shot installing pymavlink seperately. Link:
MAVProxy crashes after reinstallation, when adding new MAVLink message · Issue #623 · ArduPilot/MAVProxy (github.com)
Hello, have you solved this problem? I have exact the same issue
No I couldnt sorry
First, uninstall pymavlink.
python -m pip install --upgrade pymavlink
Please do a version-specific dependency check.
I had the same problem, but I solved it.
The final version was 2.2.8.
File “/usr/lib/python3.8/site-packages/setuptools/dist.py”, line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File “/usr/lib/python3.8/site-packages/setuptools/installer.py”, line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpxywwrwzf', '--quiet', 'future']' returned non-zero exit status 1. ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2e/92/0d7b276851a9d99c26cad7c301fd55dc68d77af7abc557ee4795e62a9c72/pymavlink-2.2.9.tar.gz#sha256=a8b875a9ecfa9aea5588743365a07f732f9c0bb762ecc971a5f91046f00f910b (from https://pypi.org/simple/pymavlink/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pymavlink-2.2.8.tar.gz (3.0 MB)
Using cached future-0.18.2.tar.gz (829 kB)
Requirement already satisfied: lxml in /usr/local/lib/python3.8/site-packages (from pymavlink) (4.6.3)
Using legacy ‘setup.py install’ for pymavlink, since package ‘wheel’ is not installed.
Using legacy ‘setup.py install’ for future, since package ‘wheel’ is not installed.
Installing collected packages: future, pymavlink
Running setup.py install for future … done
Running setup.py install for pymavlink … done
Successfully installed future-0.18.2 pymavlink-2.2.8
I encountered the same error message when running “…/Tools/autotest/sim_vehicle.py --map --console”.
I tried to “pip install pymavlink” and it showed me I already had it.
I searched within the “ardupilot” directory and found it at “C:\cygwin64\home\[user]\ardupilot\modules\mavlink”.
Then I copied the “pymavlink” folder to “C:\cygwin64\home\[user]\ardupilot\Tools\autotest” and it worked.
Heitor your solution was the only one that worked for me, thanks you so much!
In case anyone missed, while doing that you must have cygwin closed. Then open MavProxy (No GUI) and then execute cygwin again, finally you write this: cd ~/ardupilot/ArduCopter
…/Tools/autotest/sim_vehicle.py --map --console.
I tried to install/update pymavlink and it was throwing error that “python.h” not found.
For me the below solution worked:
ln -s /usr/bin/python3.6 /usr/bin/python
@Arindam_Khanda 's solution worked for me.