A working windows dronekit python installation process


I share hereunder what worked for me to get a succesfully working dronekit python on windows; I indeed could not have anything work with the so-called windows installer (an .exe file that is supposed to install everything automatically on your windows PC but that faied in my case, whatever I tried, not recognizing paths and missing files, etc).

I do not know if this procedure would work for others but you at least can try:

-I uninstalled everything (MavProxy, Pygame, Wynpython) because I wanted to start from a clean base
-I installed Winpython (C:\Program Files (x86)\WinPython-64bit-
-I installed droneapi , which inludes MavProxy. (C:\Program Files (x86)\WinPython-64bit-\python-2.7.6.amd64\Lib\site-packages\MAVProxy)
-I installed WxPython (C:\Program Files (x86)\WinPython-64bit-\python-2.7.6.amd64\Lib\site-packages\wx-3.0-msw\wx)
-I downloaded from Github a zip containing the droneapi examples (.py scripts) and placed the examples folder in the MavProxy directory

-I created a mavinit.scr file in C:\Users\Hugues\AppData\Local\MAVProxy , containing the line : module load droneapi.module.api

Since folders & path are not recognized, I did a windows batch file that launches for me automatically Mavproxy & loads dronapi, giving me the command window with the MavProxy prompt (executing in the MavProxy directory). I then just need to make sure my scripts are placed in the MavProxy directory and then launch "api start".

Here is the content of the batch file (named : MavHug.bat) that I use and works for me (my vehicle being on com10):


@echo off
set WINPYDIR="C:\Program Files (x86)\WinPython-64bit-\python-2.7.6.amd64"
set MAVPROXYDIR="C:\Program Files (x86)\WinPython-64bit-\python-2.7.6.amd64\Lib\site-packages\MAVProxy"
set PATH=WINPYDIR; MAVPROXYDIR; %WINPYDIR%\Lib\site-packages\PyQt4;%WINPYDIR%\;%WINPYDIR%\DLLs;%WINPYDIR%\Scripts;%WINPYDIR%\tools;%WINPYDIR%\tools\gnuwin32\bin;%WINPYDIR%\tools\mingw32\bin;%PATH%;%WINPYDIR%\tools\TortoiseHg

start cmd.exe /k "%WINPYDIR%\python.exe %MAVPROXYDIR%\ --master=com10"


(if you try this procedure, you have to adapt the directories according to your own windows user name)

Hope this will help others not loose two days fiddling around, as I did....

I join in attach an example a test ground station script with a windows graphical interface that I developped (place this in the MAVProxy directory, and on the MAVProxy prompt, type api start This test script displays the flight mode, voltage and current of your vehicle.



You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –