Windows 10 and Cygwin64 python3 issues

Hello all,

I have a problem when I want to build the ardupilot on Windows 10 using Cygwin64_Terminal . When I use the command “./waf copter”, I receive the error below.

$ ./waf configure
Setting top to : D:\cygwin64\home\mmehrabi\ardupilot
Setting out to : D:\cygwin64\home\mmehrabi\ardupilot\build
Autoconfiguration : enabled
Setting board to : sitl
Using toolchain : native
Checking for ‘g++’ (C++ compiler) : D:\cygwin64\bin\g++.exe
Checking for ‘gcc’ (C compiler) : D:\cygwin64\bin\gcc.exe
Could not load the Waf tool ‘gccdeps’ from [‘Tools/ardupilotwaf/’, ‘D:\cygwin64\home\mmehrabi\ardupilot\waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d’, ‘D:\cygwin64\home\mmehrabi\ardupilot’, ‘C:
\Users\mmehrabi\AppData\Local\Programs\Python\Python37\python37.zip’, ‘C:\Users\mmehrabi\AppData\Local\Programs\Python\Python37\DLLs’, ‘C:\Users\mmehrabi\AppData\Local\Programs\Pytho
n\Python37\lib’, ‘C:\Users\mmehrabi\AppData\Local\Programs\Python\Python37’, ‘C:\Users\mmehrabi\AppData\Roaming\Python\Python37\site-packages’, ‘d:\lgsvl\pythonapi-master’, ‘C:\Users\
mmehrabi\AppData\Local\Programs\Python\Python37\lib\site-packages’]
No module named ‘gccdeps’
(complete log in D:\cygwin64\home\mmehrabi\ardupilot\build\config.log)

It could be a python issue.

Can you type in the following commands into Cywgin and post the output?

which python3
which python

Thank you for your reply. They are here:

$ which python3
which: no python3 in (/home/pmweeks/drone_task/ardupilot/Tools/autotest:/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/IVI Foundation/VISA/WinNT/Bin:/cygdrive/c/Program Files/IVI Foundation/VISA/Win64/Bin:/cygdrive/c/Program Files (x86)/IVI Foundation/VISA/WinNT/Bin:/cygdrive/c/Program Files/Java/jdk1.8.0_111/bin:/cygdrive/c/Program Files/Java/jdk1.6.0_45/bin:/cygdrive/c/Program Files (x86)/Java/jdk1.8.0_111/bin:/cygdrive/c/Program Files (x86)/Java/jre1.8.0_111/lib/rt.jar:/cygdrive/d/Program Files/Modelsim/win32pe_edu:/cygdrive/c/Program Files (x86)/IVI Foundation/IVI/bin:/cygdrive/c/Program Files/IVI Foundation/IVI/bin:/cygdrive/d/Program Files/MATLAB/R2018b/bin:/cygdrive/d/Program Files/MATLAB/R2017a/runtime/win64:/cygdrive/d/Program Files/MATLAB/R2017a/bin:/cygdrive/d/Program Files/MATLAB/MATLAB Runtime/v92/runtime/win64:/cygdrive/d/Program Files (x86)/Microchip/xc32/v2.30/bin:/cygdrive/d/Program Files/Git/cmd:/cygdrive/d/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/d/Program Files (x86)/MAVProxy:/cygdrive/d/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin:/cygdrive/d/carla0.9.5/PythonAPI/carla:/cygdrive/d/program files/Modelsim/win32pe_edu:/cygdrive/c/Modeltech_pe_edu_10.4a/win32pe_edu:/cygdrive/c/Users/mmehrabi/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/mmehrabi/AppData/Local/atom/bin:/cygdrive/c/Users/mmehrabi/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Users/mmehrabi/AppData/Local/Programs/Python/Python37:/cygdrive/c/Program Files (x86)/GnuWin32:/cygdrive/d/Program Files/Git:/cygdrive/c/Program Files/CMake:/cygdrive/d/Program Files (x86)/Epic Games:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2019/Community:/cygdrive/d/ProgramData/Microsoft/VisualStudio/Packages:/cygdrive/c/ProgramData/Microsoft/Windows/Start Menu/Programs/Turbo C++/Turbo C++ 3.2:/cygdrive/c/Program Files (x86)/GnuWin32:/cygdrive/c/Users/mmehrabi/AppData/Local/Programs/Python/Python37/Scripts:/cygdrive/c/Users/mmehrabi/AppData/Roaming/Python/Python37/Scripts:/cygdrive/d/Program Files/JetBrains/PyCharm Community Edition 2019.3.1/bin:/cygdrive/c/Users/mmehrabi/AppData/Local/Microsoft/WindowsApps:/cygdrive/d/Users/mmehrabi/AppData/Local/Programs/Microsoft VS Code/bin)

$ which python
/cygdrive/c/Users/mmehrabi/AppData/Local/Programs/Python/Python37/python

Ok, your issue is that you’ve not installed Python in Cygwin.

Cygwin requires it’s own Python install, not the standard Windows installation.

See https://ardupilot.org/dev/docs/building-setup-windows-cygwin.html for the installation details.

I have installed python27, python27-devel, python27-future. You mean I should install python3 and python3-devel as well?

I did but I receive the same error.

Could not load the Waf tool ‘gccdeps’ from [‘Tools/ardupilotwaf/’, ‘D:\cygwin64\home\mmehrabi\ardupilot\waf3-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d’, ‘D:\cygwin64\home\mmehrabi\ardupilot’, ‘C:
\Users\mmehrabi\AppData\Local\Programs\Python\Python37\python37.zip’, ‘C:\Users\mmehrabi\AppData\Local\Programs\Python\Python37\DLLs’, ‘C:\Users\mmehrabi\AppData\Local\Programs\Pytho
n\Python37\lib’, ‘C:\Users\mmehrabi\AppData\Local\Programs\Python\Python37’, ‘C:\Users\mmehrabi\AppData\Roaming\Python\Python37\site-packages’, ‘d:\lgsvl\pythonapi-master’, ‘C:\Users\
mmehrabi\AppData\Local\Programs\Python\Python37\lib\site-packages’]
No module named ‘gccdeps’
(complete log in D:\cygwin64\home\mmehrabi\ardupilot\build\config.log)

$ which python
/cygdrive/c/Users/mmehrabi/AppData/Local/Programs/Python/Python37/python

$ which python3
/usr/bin/python3

Ok, it’s an issue with Cygwin Python needing to be smylinked back to usr/bin/python. See Build problem in cygwin: /usr/bin/env: ‘python’ for a fix.

Thanks.

I did it but I think I still have the error:

Could not load the Waf tool ‘gccdeps’ from [‘Tools/ardupilotwaf/’, ‘/home/mmehrabi/ardupilot/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d’, ‘/home/mmehrabi/ardupilot’, ‘/usr/lib/python27.zip’, ‘/usr/lib/python2.7’, ‘/usr/lib/python2.7/plat-cygwin’, ‘/usr/lib/python2.7/lib-tk’, ‘/usr/lib/python2.7/lib-old’, ‘/usr/lib/python2.7/lib-dynload’, ‘/usr/lib/python2.7/site-packages’]
No module named gccdeps
(complete log in /home/mmehrabi/ardupilot/build/config.log)

You may need to re-initialise the waf module: Delete the ./modules/waffolder then type in this command into Cygwin:

git submodule update --init --recursive

Sorry for too many questions, I did it but the same error:

Could not load the Waf tool ‘gccdeps’ from [‘Tools/ardupilotwaf/’, ‘/home/mmehrabi/ardupilot/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d’, ‘/home/mmehrabi/ardupilot’, ‘/usr/lib/python27.zip’, ‘/usr/lib/python2.7’, ‘/usr/lib/python2.7/plat-cygwin’, ‘/usr/lib/python2.7/lib-tk’, ‘/usr/lib/python2.7/lib-old’, ‘/usr/lib/python2.7/lib-dynload’, ‘/usr/lib/python2.7/site-packages’]
No module named gccdeps
(complete log in /home/mmehrabi/ardupilot/build/config.log)

Unfortunately, I’m really not sure what issue is causing your errors.

It looks like either waf or Cygwin are not configured correctly.

You may need to remove ardupilot and Cygwin and start again.

hi @mmehrabi did you solve this problem?

No. Do you have any solution?