This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac

hey… im using a Virtualenv on a mac with python2.7 i have configured the firewall to receive all incoming signals from the code but i keep having this error-

#the command i ran is : ./sim_vehicle.py -v ArduPlane -D -f Xplane --console --map

BUILD SUMMARY
Build directory: /Users/rayaangrewal/Desktop/code/Drone/01/src/ardupilot/build/sitl
Target Text Data BSS Total

bin/arduplane 2355200 184320 0 4296896512

Build commands will be stored in build/sitl/compile_commands.json
‘build’ finished successfully (1.866s)
SIM_VEHICLE: Run ArduPlane
SIM_VEHICLE: “/Users/rayaangrewal/Desktop/code/Drone/01/src/ardupilot/Tools/autotest/run_in_terminal_window.sh” “ArduPlane” “/Users/rayaangrewal/Desktop/code/Drone/01/src/ardupilot/build/sitl/bin/arduplane” “-S” “-I0” “–home” “-35.363261,149.165230,584,353” “–model” “Xplane” “–speedup” “1”
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: “mavproxy.py” “–master” “tcp:127.0.0.1:5760” “–sitl” “127.0.0.1:5501” “–out” “127.0.0.1:14550” “–out” “127.0.0.1:14551” “–map” “–console”
RiTW: Starting ArduPlane : /Users/rayaangrewal/Desktop/code/Drone/01/src/ardupilot/build/sitl/bin/arduplane -S -I0 --home -35.363261,149.165230,584,353 --model Xplane --speedup 1
RiTW: Window access not found, logging to /tmp/ArduPlane.log
Connect tcp:127.0.0.1:5760 source_system=255
This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.
Loaded module console
Loaded module map
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from tcp:127.0.0.1:5760
MAV> This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.

/tmp/ArduPlane.log gave me this error:

Set parameter SIM_SPEEDUP to 1.000000
Creating model Xplane at speed 1.0
Home: -35.363261 149.165230 alt=584.000000m hdg=353.000000
Waiting for XPlane data on UDP port 49001 and sending to port 49000
Starting sketch ‘ArduPlane’
Starting SITL input
Using Irlock at port : 9005
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection …
Connection on serial port 0
bind port 5762 for 2
Serial port 2 on TCP port 5762
bind port 5763 for 3
Serial port 3 on TCP port 5763
Closed connection on serial port 0

xplane has the following ip and port numbers :
ip address : 127.0.0.1
port : 49000
udp port for receiving : 49000
udp port for receiving (legacy) : 49000
udp port uploading : 49001

Your help would be much appreciated :slight_smile: