Skip to content

14. Interface and Application Programming

Assignment

Individual assignment: write an application that interfaces a user with an input &/or output device that you made

Group assignment: compare as many tool options as possible

Group assignment

P5 on browser

Go to P5 js. P5 is a javascript based library for creative coding.

P5 in VSC

Installed P5 in VSC
Installed Copilot github (didn’t work for me. you need to be a student or go for a free trial. Now to much hassle for me)
Installed p5 live panel (here you can see the live results of the things you draw)

Went to Bas Pijls his page and followed his steps. If you add the code below into studio visual code you can run visualise your result of P5 on your own server.

let port;
const BAUDRATE = 9600;

function setup() {
  createCanvas(400, 400);
  port = createSerial();

  // fetch the list of serial ports that were previously approved
  let usedPorts = usedSerialPorts();
  if (usedPorts.length > 0) {
    port.open(usedPorts[0], BAUDRATE);
  }
  else { // if no ports have been approved yet
    // add a button to open the serial port
    let button = createButton('open serial port');
    button.mousePressed(() => {
      // open the port
      port.open(BAUDRATE); // this will show a popup window asking the user to select a serial port
    });
  }
}

let sensorValue = 0;

function draw() {

  background(220);
  if (port.available() > 0) {
    let data = port.readUntil('\n');
    if (data !== null) {
      sensorValue = Number(data);

    }
  }

  circle(100, 100, sensorValue);

  text(sensorValue, 10, 10);

}

esp32-cam servos

Last week I could see that my motion tracking system was working but the servos didn’t respond. I tried to understand the code, but it’s way to complex for me. I came up with a view ideas to make it work.

  • See if the servos work with the same wiring but with a different board.
  • Install an earlier library of the esp32Servo (library version 0.4.2.)
  • If that won’t work I’ll try to see if I can change something in the servo code.

The servos work fine with the same wiring but controlling them with a different board.

I installed the esp32Servo 0.4.2. library version and updated the code. Everything seems to work in the serial.

And bombaclat! It also works fine with 1 of the servos now. I tried to edit the code but it’s to difficult to understand for me. It would be really cool to control the second servo. But the guy who wrote this code reduces the image of the cam to a horizontal line.

My servo need to move in multiple directions. So I think it would be wise due to the time that I have to continue with an different code.

This is the code that I’ve been using. It’s super messy and hard to understand so I don’t recommend to work with it. If you do download the zip file. Because there are neccesary .h files in there that you need to use.

youtube link

/*********
  Rui Santos
  Complete instructions at https://RandomNerdTutorials.com/esp32-cam-projects-ebook/

  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*********/

#include "esp_camera.h"

#include "camera_pins.h"        // Must include this after setting
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
#include "soc/soc.h"             // disable brownout problems
#include "soc/rtc_cntl_reg.h"    // disable brownout problems
#include "esp_http_server.h"
#include <ESP32Servo.h>

#include "helpers.h"
unsigned long last_still=0;

bool last_region_g4 = true;
bool toggle_track = true;

unsigned long squirt_t;
bool tracking_on = false;

// Replace with your network credentials
const char* ssid = "KPNCD96B6";
const char* password = "L3ChKrrtntdhVNJc";

#define PART_BOUNDARY "123456789000000000000987654321"


//#define CAMERA_MODEL_M5STACK_PSRAM
//#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM_B
//#define CAMERA_MODEL_WROVER_KIT

#define SERVO_1      14  //top
#define SERVO_2      15  //bottom

////here
#define DRIVER_PIN   12 //

#define SERVO_STEP   5

Servo servoN1;
Servo servoN2;
Servo servo1;
Servo servo2;

int servo1Pos = 90;
int servo2Pos = 90;

static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;
static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";

httpd_handle_t camera_httpd = NULL;
httpd_handle_t stream_httpd = NULL;

static const char PROGMEM INDEX_HTML[] = R"rawliteral(
<html>
  <head>
    <title>ESP32-CAM Robot</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
      body { font-family: Arial; text-align: center; margin:0px auto; padding-top: 30px;}
      table { margin-left: auto; margin-right: auto; }
      td { padding: 8 px; }
      .button {
        background-color: #2f4468;
        border: none;
        color: white;
        padding: 10px 20px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 18px;
        margin: 6px 3px;
        cursor: pointer;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
      }
      img {  width: auto ;
        max-width: 100% ;
        height: auto ; 
      }
    </style>
  </head>
  <body>
    <h1>ESP32-CAM Pan and Tilt</h1>
    <img src="" id="photo" >
    <table>
      <tr><td colspan="3" align="center"><button class="button" onmousedown="toggleCheckbox('up');" ontouchstart="toggleCheckbox('up');">Up</button></td></tr>
      <tr><td align="center"><button class="button" onmousedown="toggleCheckbox('left');" ontouchstart="toggleCheckbox('left');">Left</button></td><td align="center"></td><td align="center"><button class="button" onmousedown="toggleCheckbox('right');" ontouchstart="toggleCheckbox('right');">Right</button></td></tr>
      <tr><td colspan="3" align="center"><button class="button" onmousedown="toggleCheckbox('down');" ontouchstart="toggleCheckbox('down');">Down</button></td></tr>                   
    </table>
     <table>
      <tr><td align="center"><button class="button" onmousedown="toggleCheckbox('squirt');" ontouchstart="toggleCheckbox('squirt');">Squirt</button></td><td align="center"></td>
      <td align="center"><button class="button" onmousedown="toggleCheckbox('track');" ontouchstart="toggleCheckbox('track');">Track</button></td>
      <td align="center"><button class="button" onmousedown="toggleCheckbox('track_off');" ontouchstart="toggleCheckbox('track_off');">Track off</button></td>
      </tr>
     </table>

   <script>
   function toggleCheckbox(x) {
     var xhr = new XMLHttpRequest();
     xhr.open("GET", "/action?go=" + x, true);
     xhr.send();
   }
   window.onload = document.getElementById("photo").src = window.location.href.slice(0, -1) + ":81/stream";
  </script>
  </body>
</html>
)rawliteral";

static esp_err_t index_handler(httpd_req_t *req){
  httpd_resp_set_type(req, "text/html");
  return httpd_resp_send(req, (const char *)INDEX_HTML, strlen(INDEX_HTML));
}

void move_left(int degs){
//  degs = 1;
  Serial.print("in move left ");
  Serial.println(servo2Pos);
  Serial.println(degs);
  for(int i = 0; i<degs; i++){
    if(servo2Pos <= 180-SERVO_STEP) {
      servo2Pos += SERVO_STEP;
      Serial.print("in move left ");
      Serial.println(servo2Pos);
      servo2.write(servo2Pos);
      Serial.println(degs);
      delay(30);
    }
  }
}

void move_right(int degs){
//  degs = 1;
  Serial.print("in move right ");
  Serial.println(degs);
  for(int i = 0; i<degs; i++){
    if(servo2Pos >= SERVO_STEP) {
      servo2Pos -= SERVO_STEP;
      Serial.print("in move right ");
      Serial.println(servo2Pos);
      servo2.write(servo2Pos);
      Serial.println(degs);
      delay(30);
    }
  }
}


static esp_err_t stream_handler(httpd_req_t *req){
  fb = NULL;
  esp_err_t res = ESP_OK;
  size_t _jpg_buf_len = 0;
  uint8_t * _jpg_buf = NULL;
  char * part_buf[64];

  res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
  if(res != ESP_OK){
    return res;
  }

  while(true){
    fb = esp_camera_fb_get();
    if (!fb) {
      Serial.println("Camera capture failed");
      res = ESP_FAIL;
    } else {
      //This is the motion tracking stuff here
      if(tracking_on && finished_tracking)
      {
//        toggle_track = false;
        last_still = millis();
      if (!capture_still())
          {
              Serial.println("Failed capture");
          } else{
            cnt++;
            if(first_capture) {
              //for first capture we copy the current to the previous frame
              //so that we don't have stale data from before we moved
              //the servo in the previous frame
              cnt = 0;
              update_frame();
              first_capture = false;
             }
            }

        if (motion_detect())
              {
                cnt = 0;
                do_tracking = true; //loop will activate the servo tracking if do_tracking is true
                finished_tracking = false; //don't do any more image processing until serov
                                           //is finished because we don't want to mistake the motion of the servo
                                           //for something moving
                Serial.println("motion detected");
              } else if(cnt>1000){
                //motion hasn't been detected for 1000 frames
                servo2.write(90);
                delay(100);
                capture_still();
                update_frame();
              }
        update_frame();

      } else {
        toggle_track = true; //this is not used
      }
      //end motion tracking and convert to jpeg for transportation
      if(fb->width > 100){
        if(fb->format != PIXFORMAT_JPEG){
          bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);
          esp_camera_fb_return(fb);
          fb = NULL;
          if(!jpeg_converted){
            Serial.println("JPEG compression failed");
            res = ESP_FAIL;
          }
        } else {
          _jpg_buf_len = fb->len;
          _jpg_buf = fb->buf;
        }
      }
    }
    if(res == ESP_OK){
      size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
      res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
    }
    if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
    }
    if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
    }
    if(fb){
      esp_camera_fb_return(fb);
      fb = NULL;
      _jpg_buf = NULL;
    } else if(_jpg_buf){
      free(_jpg_buf);
      _jpg_buf = NULL;
    }

    if(res != ESP_OK){
      break;
    }
    //Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len));
  }
  return res;
}

static esp_err_t cmd_handler(httpd_req_t *req){
  char*  buf;
  size_t buf_len;
  char variable[32] = {0,};

  buf_len = httpd_req_get_url_query_len(req) + 1;
  if (buf_len > 1) {
    buf = (char*)malloc(buf_len);
    if(!buf){
      httpd_resp_send_500(req);
      return ESP_FAIL;
    }
    if (httpd_req_get_url_query_str(req, buf, buf_len) == ESP_OK) {
      if (httpd_query_key_value(buf, "go", variable, sizeof(variable)) == ESP_OK) {
      } else {
        free(buf);
        httpd_resp_send_404(req);
        return ESP_FAIL;
      }
    } else {
      free(buf);
      httpd_resp_send_404(req);
      return ESP_FAIL;
    }
    free(buf);
  } else {
    httpd_resp_send_404(req);
    return ESP_FAIL;
  }

  sensor_t * s = esp_camera_sensor_get();
  //flip the camera vertically
  //s->set_vflip(s, 1);          // 0 = disable , 1 = enable
  // mirror effect
  //s->set_hmirror(s, 1);          // 0 = disable , 1 = enable

  int res = 0;

  if(!strcmp(variable, "up")) {
    if(servo1Pos <= 150) {
      servo1Pos += SERVO_STEP;
      servo1.write(servo1Pos);
    }
    Serial.println(servo1Pos);
    Serial.println("Up");
  }
  else if(!strcmp(variable, "left")) {
    if(servo2Pos <= 170) {
      servo2Pos += SERVO_STEP;
      servo2.write(servo2Pos);
    }
    Serial.println(servo2Pos);
    Serial.println("Left");
  }
  else if(!strcmp(variable, "right")) {
    if(servo2Pos >= 10) {
      servo2Pos -= SERVO_STEP;
      servo2.write(servo2Pos);
    }
    Serial.println(servo2Pos);
    Serial.println("Right");
  }
  else if(!strcmp(variable, "down")) {
    if(servo1Pos >= 30) {
      servo1Pos -= SERVO_STEP;
      servo1.write(servo1Pos);
    }
    Serial.println(servo1Pos);
    Serial.println("Down");
  }
  ////////changed here
  else if(!strcmp(variable, "squirt")) {
    digitalWrite(DRIVER_PIN,HIGH);
    squirt_t = millis();

//    Serial.println(servo1Pos);
    Serial.println("squirt");
  }
  else if(!strcmp(variable, "track")) {
    tracking_on = true;

//    Serial.println(servo1Pos);
    Serial.println("track");
  }
  else if(!strcmp(variable, "track_off")) {
    tracking_on = false;

//    Serial.println(servo1Pos);
    Serial.println("track off");
  }
  else {
    res = -1;
  }

  if(res){
    return httpd_resp_send_500(req);
  }

  httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
  return httpd_resp_send(req, NULL, 0);
}

void startCameraServer(){
  httpd_config_t config = HTTPD_DEFAULT_CONFIG();
  config.server_port = 80;
  httpd_uri_t index_uri = {
    .uri       = "/",
    .method    = HTTP_GET,
    .handler   = index_handler,
    .user_ctx  = NULL
  };

  httpd_uri_t cmd_uri = {
    .uri       = "/action",
    .method    = HTTP_GET,
    .handler   = cmd_handler,
    .user_ctx  = NULL
  };
  httpd_uri_t stream_uri = {
    .uri       = "/stream",
    .method    = HTTP_GET,
    .handler   = stream_handler,
    .user_ctx  = NULL
  };
  if (httpd_start(&camera_httpd, &config) == ESP_OK) {
    httpd_register_uri_handler(camera_httpd, &index_uri);
    httpd_register_uri_handler(camera_httpd, &cmd_uri);
  }
  config.server_port += 1;
  config.ctrl_port += 1;
  if (httpd_start(&stream_httpd, &config) == ESP_OK) {
    httpd_register_uri_handler(stream_httpd, &stream_uri);
  }
}

void setup() {
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
  ////////////////////////////////////////////////////////////
  //changed here
  squirt_t = millis();
  pinMode(DRIVER_PIN, OUTPUT);
  digitalWrite(DRIVER_PIN, LOW); //make sure motor is off
  ///////////////////////////////////////////////////////

  servo1.setPeriodHertz(50);    // standard 50 hz servo
  servo2.setPeriodHertz(50);    // standard 50 hz servo
  servoN1.attach(2, 1000, 2000);
  servoN2.attach(13, 1000, 2000);

  servo1.attach(SERVO_1, 1000, 2000);
  servo2.attach(SERVO_2, 1000, 2000);

  servo1.write(servo1Pos);
  servo2.write(servo2Pos);

  Serial.begin(115200);
  Serial.setDebugOutput(false);

  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_GRAYSCALE; //PIXFORMAT_JPEG; 

  if(psramFound()){
    config.frame_size = MY_FRAMESIZE; //FRAMESIZE_QVGA;
    config.jpeg_quality = 10;
    config.fb_count = 2;
  } else {
    config.frame_size = MY_FRAMESIZE; //FRAMESIZE_QVGA;
    config.jpeg_quality = 12;
    config.fb_count = 1;
  }

  // Camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }
  // Wi-Fi connection
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

  Serial.print("Camera Stream Ready! Go to: http://");
  Serial.println(WiFi.localIP());

  // Start streaming web server
  startCameraServer();
}

void loop() {
  //changed this
  if((millis()-squirt_t)>400){
    digitalWrite(DRIVER_PIN, LOW);
    watergun_off_time = millis();
  }
  if(tracking_on && do_tracking){
    do_tracking = false;
    finished_tracking = false;
     Serial.println("Motion detected");

    //do stuff here
    if(region_of_interest<4){

      //to the left
//      if(!last_region_g4)
      move_left(3*(4-region_of_interest));
      last_region_g4 = false;
    } else if(region_of_interest>4){
//      if(last_region_g4)
      move_right(3*(region_of_interest-4));
      last_region_g4 = true;
    }
    if(fire_waterpistol){ //only fire water pistol if enough motion is detected
      if(millis() - watergun_off_time > 100){
        //don't want to turn the water gun on again unless it's been off for at least 300ms
        digitalWrite(DRIVER_PIN,HIGH);
        squirt_t = millis(); }
    }

    delay(100);
    first_capture = true;
    finished_tracking = true;
    Serial.print("regin_of_interest = ");
    Serial.println(region_of_interest);

  }
//  delay(10);
}

}

Create a Draggable Element in JavaScript

Since the assignment of this week is interface and application programming I want to create a interface to move my servos.
I found a really cool link where they explain how to make a joystick interface. As you see below you can move the button know with a little java script integrated in the VSC.

I didn’t knew anything about HTML or JAVA. So a little research is recommended so you’ll know the relation between the two.

Drag/Drop/Bounce

HTML provides the actual content, whereas JavaScript provides an interface for the end-users to interact by generating dynamic content for the users.

The code below results in the graphic you see above.

<!DOCTYPE html>
<html>

<head>
  <meta name="viewport" 
        content="width=device-width, 
        initial-scale=1.0, 
        user-scalable=no" />
  <title>Drag/Drop/Bounce</title>
  <style>
    #container {
      width: 100%;
      height: 400px;
      background-color: #333;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      border-radius: 7px;
      touch-action: none;
    }
    #item {
      width: 100px;
      height: 100px;
      background-color: rgb(245, 230, 99);
      border: 10px solid rgba(136, 136, 136, .5);
      border-radius: 50%;
      touch-action: none;
      user-select: none;
    }
    #item:active {
      background-color: rgba(168, 218, 220, 1.00);
    }
    #item:hover {
      cursor: pointer;
      border-width: 20px;
    }
  </style>
</head>

<body>

  <div id="outerContainer">
    <div id="container">
      <div id="item">

      </div>
    </div>
  </div>

  <script>
    var dragItem = document.querySelector("#item");
    var container = document.querySelector("#container");

    var active = false;
    var currentX;
    var currentY;
    var initialX;
    var initialY;
    var xOffset = 0;
    var yOffset = 0;

    container.addEventListener("touchstart", dragStart, false);
    container.addEventListener("touchend", dragEnd, false);
    container.addEventListener("touchmove", drag, false);

    container.addEventListener("mousedown", dragStart, false);
    container.addEventListener("mouseup", dragEnd, false);
    container.addEventListener("mousemove", drag, false);

    function dragStart(e) {
      if (e.type === "touchstart") {
        initialX = e.touches[0].clientX - xOffset;
        initialY = e.touches[0].clientY - yOffset;
      } else {
        initialX = e.clientX - xOffset;
        initialY = e.clientY - yOffset;
      }

      if (e.target === dragItem) {
        active = true;
      }
    }

    function dragEnd(e) {
      initialX = currentX;
      initialY = currentY;

      active = false;
    }

    function drag(e) {
      if (active) {

        e.preventDefault();

        if (e.type === "touchmove") {
          currentX = e.touches[0].clientX - initialX;
          currentY = e.touches[0].clientY - initialY;
        } else {
          currentX = e.clientX - initialX;
          currentY = e.clientY - initialY;
        }

        xOffset = currentX;
        yOffset = currentY;

        setTranslate(currentX, currentY, dragItem);
      }
    }

    function setTranslate(xPos, yPos, el) {
      el.style.transform = "translate3d(" + xPos + "px, " + yPos + "px, 0)";
    }
  </script>
</body>

</html>

Pan Tilt with graphic joystick module

Found a code with an explanation that is understandable.
The code and example I found on robotzero his page. He is really cool. His explanations are clear. He also responds to questions.

If you work with updated versions of the libraries or IDE it might not compile

I work in Arduino 1.8.19
Make sure to install the esp32 espressive 1.0.4 in the board manager.
ArduinoWebsocket 0.4.5

Installed Arduino_ESP32_OTA. Might need to delete this. Did not succeed.

When I install espressive esp32 1.0.5 I get the same error when I install 1.0.6 I get the following error.

When I try to upload the camerawebserver example (which already worked) I get the same error.

I read that opening via the terminal should activate the Pyton script. I tried. Got the same error with the same beginning as before.

I think Pyton2 or Python (Python = python2) is not presinstalled on MacOS 12.6. Some libraries didn’t work for that reason. Python3 is called ptyhon3 to be clear.

You can check which python version have with the folling commands. I did this way too late:(.

Last login: Tue May  9 21:11:00 on ttys004
➜  ~ python --version
Python 2.7.18
➜  ~ python3 --version
Python 3.9.6
➜  ~ 

Found the following command via this link. It worked. I think this changes the PATH from Python 3 to 2. So I had Python/Python2 preinstalled on my MacOS montery.

sed -i -e 's/=python /=python3 /g' ~/Library/Arduino15/packages/esp32/hardware/esp32/*/platform.txt

Couldn’t get the servos working. Ah I know why. The guy upload his code with pastebin.com. But the code reforms some how. If you download the raw version and paste it in arduino is should work right.

#include <ArduinoWebsockets.h>
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
#include "esp_camera.h"
#include "soc/soc.h"      
#include "soc/rtc_cntl_reg.h"

int index_html_gz_len = 3863;
const uint8_t index_html_gz[] = {
  0x1f, 0x8b, 0x08, 0x08, 0x66, 0x84, 0x3d, 0x5d, 0x00, 0xff, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x2e, 0x67, 0x7a, 0x00, 0x95, 0x58, 0x7b, 0x6f, 0x1a, 0x3b, 0x16, 0xff, 0x3b, 0x7c, 0x0a, 0x97, 0x68, 0x0b, 0x6c, 0x61, 0x86, 0x40, 0xdb, 0x6d, 0x28, 0xe4, 0x6a, 0xdb, 0x44, 0x6a, 0xa5, 0x56, 0xad, 0x36, 0xd9, 0x6d, 0xa2, 0xd5, 0x2a, 0x32, 0x33, 0x06, 0xdc, 0x7a, 0xec, 0x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, 0x40, 0xbf, 0x00, 0x13, 0x65, 0x13, 0xd4, 0x07, 0x12, 0x00, 0x00
};

const char* ssid = "KPNCD96B6";
const char* password = "L3ChKrrtntdhVNJc";

#define PWDN_GPIO_NUM     32
#define RESET_GPIO_NUM    -1
#define XCLK_GPIO_NUM      0
#define SIOD_GPIO_NUM     26
#define SIOC_GPIO_NUM     27
#define Y9_GPIO_NUM       35
#define Y8_GPIO_NUM       34
#define Y7_GPIO_NUM       39
#define Y6_GPIO_NUM       36
#define Y5_GPIO_NUM       21
#define Y4_GPIO_NUM       19
#define Y3_GPIO_NUM       18
#define Y2_GPIO_NUM        5
#define VSYNC_GPIO_NUM    25
#define HREF_GPIO_NUM     23
#define PCLK_GPIO_NUM     22

camera_fb_t * fb = NULL;

using namespace websockets;
WebsocketsServer WSserver;
AsyncWebServer webserver(80);

// Arduino like analogWrite
// value has to be between 0 and valueMax
void ledcAnalogWrite(uint8_t channel, uint32_t value, uint32_t valueMax = 180) {
  // calculate duty, 8191 from 2 ^ 13 - 1
  uint32_t duty = (8191 / valueMax) * min(value, valueMax);
  ledcWrite(channel, duty);
}

void setup() {
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
  Serial.begin(115200);
  // Ai-Thinker: pins 2 and 12
  ledcSetup(2, 50, 16); //channel, freq, resolution
  ledcAttachPin(2, 2); // pin, channel
  ledcSetup(4, 50, 16);
  ledcAttachPin(12, 4);

  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_JPEG;
  //init with high specs to pre-allocate larger buffers
  if (psramFound()) {
    config.frame_size = FRAMESIZE_UXGA;
    config.jpeg_quality = 10;
    config.fb_count = 2;
  } else {
    config.frame_size = FRAMESIZE_SVGA;
    config.jpeg_quality = 12;
    config.fb_count = 1;
  }

  // camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }

  sensor_t * s = esp_camera_sensor_get();
  s->set_framesize(s, FRAMESIZE_QVGA);

  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.print("Connected to ");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  webserver.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
    AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", index_html_gz, sizeof(index_html_gz));
    response->addHeader("Content-Encoding", "gzip");
    request->send(response);
  });

  webserver.begin();
  WSserver.listen(82);
}


void handle_message(WebsocketsMessage msg) {
  int commaIndex = msg.data().indexOf(',');
  int panValue = msg.data().substring(0, commaIndex).toInt();
  int tiltValue = msg.data().substring(commaIndex + 1).toInt();

  panValue = map(panValue, -90, 90, 0, 180); // 0-180
  tiltValue = map(tiltValue, -90, 90, 180, 0); // 0-180 reversed

  ledcAnalogWrite(2, panValue); // channel, value
  ledcAnalogWrite(4, tiltValue);
}

void loop() {
  auto client = WSserver.accept();
  client.onMessage(handle_message);
  while (client.available()) {
    client.poll();
    fb = esp_camera_fb_get();
    client.sendBinary((const char *)fb->buf, fb->len);
    esp_camera_fb_return(fb);
    fb = NULL;
  }
}

In the code you have a HTML and JAVA part that is written in HEX.

I wanted to convert HEX to something more readable. But I know the hex exists out of HTML and JAVA so I’m not sure how to tackle that. With cyberchef from GitHub you can convert code.

Uhhhhh, huh? This is weird?

I tried to upload the HTML and JAVA script instead of the HEX code for the joystick graphics. This didn’t work. I’m not sure why. Got the following errors.

Face regocnition part 1

The face regocnition didn’t work. I think that I installed the wrong update of the esp32servo library. But in the new IDE I get this error.

#include <ArduinoWebsockets.h>
#include "esp_http_server.h"
#include <WiFi.h>
#include "camera_index.h"
#include "esp_camera.h"
#include "fb_gfx.h"
#include "fd_forward.h"


const char* ssid = "KPNCD96B6";
const char* password = "L3ChKrrtntdhVNJc";

// Arduino like analogWrite
// value has to be between 0 and valueMax
void ledcAnalogWrite(uint8_t channel, uint32_t value, uint32_t valueMax = 180)
{
  // calculate duty, 8191 from 2 ^ 13 - 1
  uint32_t duty = (8191 / valueMax) * min(value, valueMax);
  ledcWrite(channel, duty);
}
int pan_center = 90; // center the pan servo
int tilt_center = 90; // center the tilt servo

#define CAMERA_MODEL_AI_THINKER
#include "camera_pins.h"

using namespace websockets;
WebsocketsServer socket_server;

static inline mtmn_config_t app_mtmn_config()
{
  mtmn_config_t mtmn_config = {0};
  mtmn_config.type = FAST;
  mtmn_config.min_face = 80;
  mtmn_config.pyramid = 0.707;
  mtmn_config.pyramid_times = 4;
  mtmn_config.p_threshold.score = 0.6;
  mtmn_config.p_threshold.nms = 0.7;
  mtmn_config.p_threshold.candidate_number = 20;
  mtmn_config.r_threshold.score = 0.7;
  mtmn_config.r_threshold.nms = 0.7;
  mtmn_config.r_threshold.candidate_number = 10;
  mtmn_config.o_threshold.score = 0.7;
  mtmn_config.o_threshold.nms = 0.7;
  mtmn_config.o_threshold.candidate_number = 1;
  return mtmn_config;
}
mtmn_config_t mtmn_config = app_mtmn_config();

httpd_handle_t camera_httpd = NULL;

void setup()
{
  Serial.begin(115200);
  Serial.println();

  // Ai-Thinker: pins 2 and 12
  ledcSetup(2, 50, 16); //channel, freq, resolution
  ledcAttachPin(2, 2); // pin, channel

  ledcSetup(4, 50, 16);
  ledcAttachPin(12, 4);

  ledcAnalogWrite(2, 90); // channel, 0-180
  delay(1000);
  ledcAnalogWrite(4, 90);

  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_JPEG;
  //init with high specs to pre-allocate larger buffers
  if (psramFound()) {
    config.frame_size = FRAMESIZE_UXGA;
    config.jpeg_quality = 10;
    config.fb_count = 2;
  } else {
    config.frame_size = FRAMESIZE_SVGA;
    config.jpeg_quality = 12;
    config.fb_count = 1;
  }
#if defined(CAMERA_MODEL_ESP_EYE)
  pinMode(13, INPUT_PULLUP);
  pinMode(14, INPUT_PULLUP);
#endif
  // camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }

  sensor_t * s = esp_camera_sensor_get();
  s->set_framesize(s, FRAMESIZE_QVGA);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

  app_httpserver_init();
  socket_server.listen(82);

  Serial.print("Camera Ready! Use 'http://");
  Serial.print(WiFi.localIP());
  Serial.println("' to connect");
}

static esp_err_t index_handler(httpd_req_t *req)
{
  httpd_resp_set_type(req, "text/html");
  httpd_resp_set_hdr(req, "Content-Encoding", "gzip");
  return httpd_resp_send(req, (const char *)index_ov2640_html_gz, index_ov2640_html_gz_len);
}

httpd_uri_t index_uri = {
  .uri       = "/",
  .method    = HTTP_GET,
  .handler   = index_handler,
  .user_ctx  = NULL
};

void app_httpserver_init ()
{
  httpd_config_t config = HTTPD_DEFAULT_CONFIG();
  if (httpd_start(&camera_httpd, &config) == ESP_OK)
    Serial.println("httpd_start");
  {
    httpd_register_uri_handler(camera_httpd, &index_uri);
  }
}

static void draw_face_boxes(dl_matrix3du_t *image_matrix, box_array_t *boxes)
{
  int x, y, w, h, i, half_width, half_height;
  fb_data_t fb;
  fb.width = image_matrix->w;
  fb.height = image_matrix->h;
  fb.data = image_matrix->item;
  fb.bytes_per_pixel = 3;
  fb.format = FB_BGR888;
  for (i = 0; i < boxes->len; i++) {

    // Convoluted way of finding face centre...
    x = ((int)boxes->box[i].box_p[0]);
    w = (int)boxes->box[i].box_p[2] - x + 1;
    half_width = w / 2;
    int face_center_pan = x + half_width; // image frame face centre x co-ordinate

    y = (int)boxes->box[i].box_p[1];
    h = (int)boxes->box[i].box_p[3] - y + 1;
    half_height = h / 2;
    int face_center_tilt = y + half_height;  // image frame face centre y co-ordinate

    //    assume QVGA 320x240
    //    int sensor_width = 320;
    //    int sensor_height = 240;
    //    int lens_fov = 45
    //    float diagonal = sqrt(sq(sensor_width) + sq(sensor_height)); // pixels along the diagonal
    //    float pixels_per_degree = diagonal / lens_fov;
    //    400/45 = 8.89

    float move_to_x = pan_center + ((-160 + face_center_pan) / 8.89) ;
    float move_to_y = tilt_center + ((-120 + face_center_tilt) / 8.89) ;

    pan_center = (pan_center + move_to_x) / 2;
    Serial.println(pan_center);
    ledcAnalogWrite(2, pan_center); // channel, 0-180

    tilt_center = (tilt_center + move_to_y) / 2;
    int reversed_tilt_center = map(tilt_center, 0, 180, 180, 0);
    ledcAnalogWrite(4, reversed_tilt_center); // channel, 0-180

  }
}

void loop()
{
  auto client = socket_server.accept();
  camera_fb_t * fb = NULL;
  dl_matrix3du_t *image_matrix = NULL;

  while (true) {
    client.poll();
    fb = esp_camera_fb_get();
    image_matrix = dl_matrix3du_alloc(1, fb->width, fb->height, 3);

    fmt2rgb888(fb->buf, fb->len, fb->format, image_matrix->item);

    box_array_t *net_boxes = NULL;
    net_boxes = face_detect(image_matrix, &mtmn_config);

    if (net_boxes) {
      draw_face_boxes(image_matrix, net_boxes);
      free(net_boxes->score);
      free(net_boxes->box);
      free(net_boxes->landmark);
      free(net_boxes);
    }

    client.sendBinary((const char *)fb->buf, fb->len);

    esp_camera_fb_return(fb);
    fb = NULL;
    dl_matrix3du_free(image_matrix);
  }
}

While trying to upload the code in the old IDE I get the python error again.

We know how to solve that know. Solved but got a new error.

Traceback (most recent call last):
  File "esptool.py", line 57, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports.py", line 29, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports_posix.py", line 31, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports_osx.py", line 32, in <module>
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
Failed to execute script esptool
exit status 255
/Applications/Arduino.app/Contents/Java/arduino-builder returned 255
Error compiling for board DOIT ESP32 DEVKIT V1.

Did some risky stuff. See below.

I get this eror in the Arduino 2.1.0 IDE and my older version doesn’t want to open now .

Deleted the esp32 library by espressive. Installed the 1.0.6 because other libraries don’t run with the 2.1.0 Arduino IDE.

exec: "python": executable file not found in $PATH

Ran this line again in my terminal. Restarted the arduino IDE and the sketch compiled.

sed -i -e 's/=python /=python3 /g' ~/Library/Arduino15/packages/esp32/hardware/esp32/*/platform.txt

Face regocnition part 2

I still want to follow this link I’ll use the same code as Face regonition part 1.

I know that I have to run esp32 1.0.4.

Let’s go

I deleted my two Arduino IDE’s
Downloaded Arduino IDE 1.8.19 but it doesn’t open… Probably because I chaded the .PY files.

Opened my secret Library file
Click ‘Go’ in the Finder menu bar, and hold down the ‘Option’ (Alt) key.
The Library entry now appears in the Finder > Deleted all Arduino files.

Downloaded Arduino IDE 1.8.19
Added the following line
https://dl.espressif.com/dl/package_esp32_index.json

Installed ESP32 version 1.0.4 in the board manager
Selected the AI thinker esp32 cam
Ran an example sketch for the webserver
Changed my internet credentials
Uplaoded the sketch
and got this error:

exec: "python": executable file not found in $PATH
So what happens here? Ran env and found the $PATH

It points to Python 3.9
Deleted the esp32 1.0.4 and installed the esp32 library to 1.0.6.
Then it seemed to work. So the problem is that esp32 1.0.4 is not compatible with Python 3.9
(earlier I used the line of code that I used but I don’t want to that since I don’t think that it will solve everything)
I read that if you download Python 2 that this error will be solved
So now we’re gonna install 1.0.4 and try to run it with the correct Python version
brew update
pyenv install 2.7.10
checking if Python correctly installed Python --version
Searched for path were Python 2.7.10 was located which Python
This gave the Python2 path. This path we added to our local environment by adding it to $PATH with the command export PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Then we got the following error

ls -la to see what’s in directory

To give permission to this file 2.6.1 chmod 755 esptool.py
Got an error that the pyfile wasn’t regocnized
Followed the following steps

Now we got this error

I think it’s done for today. It was a good lesson debugging. It took me more then a day to do the above and I didn’t succeed.

Succes

So we ended here…

cd
ls -al
open .zshrc (.zshrc runs first)
added a new path: export PATH=/usr/local/bin/python:$PATH
Open arduino via terminal open -a arduino
Now arduino opens the correct path

I’ll print this pan and tilt mechanism so I can test the codes more efficient.

pan&titl
Thanks Elektronlibre

Notes

Last login: Mon May  8 17:32:18 on ttys001
➜  ~ sed -i -e 's/=python /=python3 /g' ~/Library/Arduino15/packages/esp32/hardware/esp32/*/platform.txt
➜  ~ pip install esptool
\DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting esptool
  Downloading https://files.pythonhosted.org/packages/90/39/889d4d10c3a9a82ce6ecd0d5b6f4bfb64f904f8c37e1cf61e0e592de91d5/esptool-3.3.3.tar.gz (216kB)
     |████████████████████████████████| 225kB 6.3MB/s 
Collecting cryptography>=2.1.4 (from esptool)
  Downloading https://files.pythonhosted.org/packages/57/1e/ec7c5823c5a80899445eed3f83b8f050ad15e314367146be5d2fa872a688/cryptography-3.3.2-cp27-cp27m-macosx_10_10_x86_64.whl (1.8MB)
     |████████████████████████████████| 1.8MB 5.5MB/s 
Collecting ecdsa>=0.16.0 (from esptool)
  Downloading https://files.pythonhosted.org/packages/09/d4/4f05f5d16a4863b30ba96c23b23e942da8889abfa1cdbabf2a0df12a4532/ecdsa-0.18.0-py2.py3-none-any.whl (142kB)
     |████████████████████████████████| 143kB 14.5MB/s 
Collecting pyserial>=3.0 (from esptool)
  Using cached https://files.pythonhosted.org/packages/07/bc/587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558/pyserial-3.5-py2.py3-none-any.whl
Collecting reedsolo<=1.5.4,>=1.5.3 (from esptool)
  Downloading https://files.pythonhosted.org/packages/c8/cb/bb2ddbd00c9b4215dd57a2abf7042b0ae222b44522c5eb664a8fd9d786da/reedsolo-1.5.4.tar.gz (271kB)
     |████████████████████████████████| 276kB 13.5MB/s 
Collecting bitstring<4,>=3.1.6 (from esptool)
  Downloading https://files.pythonhosted.org/packages/2a/de/c831618fed7911cb5252de2cccd01fd7894574b4419be05aa6c125083de5/bitstring-3.1.9-py2-none-any.whl
Collecting enum34; python_version < "3" (from cryptography>=2.1.4->esptool)
  Downloading https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
Collecting cffi>=1.12 (from cryptography>=2.1.4->esptool)
  Downloading https://files.pythonhosted.org/packages/3f/fa/dfc242febbff049509e5a35a065bdc10f90d8c8585361c2c66b9c2f97a01/cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl (177kB)
     |████████████████████████████████| 184kB 15.5MB/s 
Collecting six>=1.4.1 (from cryptography>=2.1.4->esptool)
  Downloading https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography>=2.1.4->esptool)
  Downloading https://files.pythonhosted.org/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.12->cryptography>=2.1.4->esptool)
  Downloading https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118kB)
     |████████████████████████████████| 122kB 13.0MB/s 
Installing collected packages: enum34, pycparser, cffi, six, ipaddress, cryptography, ecdsa, pyserial, reedsolo, bitstring, esptool
  Running setup.py install for reedsolo ... done
  Running setup.py install for esptool ... done
Successfully installed bitstring-3.1.9 cffi-1.15.1 cryptography-3.3.2 ecdsa-0.18.0 enum34-1.1.10 esptool-3.3.3 ipaddress-1.0.23 pycparser-2.21 pyserial-3.5 reedsolo-1.5.4 six-1.16.0
WARNING: You are using pip version 19.2.3, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
➜  ~ pip list
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package      Version
------------ -------
bitstring    3.1.9  
cffi         1.15.1 
cryptography 3.3.2  
ecdsa        0.18.0 
enum34       1.1.10 
esptool      3.3.3  
ipaddress    1.0.23 
pip          19.2.3 
pycparser    2.21   
pyserial     3.5    
reedsolo     1.5.4  
setuptools   41.2.0 
six          1.16.0 
WARNING: You are using pip version 19.2.3, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
➜  ~ cd /Users/samsongenet/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/e
cd: no such file or directory: /Users/samsongenet/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/e
➜  ~ ls
Applications   Fusion 360 CAM Pictures       index.html     test
Controller.txt Google Drive   Public         jsconfig.json
Desktop        Library        bin            libraries
Documents      Movies         fabacademy     sketch.js
Downloads      Music          gaatjes.txt    style.css
➜  ~ cd /Users/samsongenet/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/ 
➜  2.6.1 ls
esptool    esptool.py
➜  2.6.1 ls -la
total 7904
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 .
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 ..
-rwxr-xr-x  1 samsongenet  staff  3897939 Feb 14  2019 esptool
-rw-r--r--  1 samsongenet  staff   143623 Oct  2  2019 esptool.py
➜  2.6.1 chmod 777 esptool.py 
➜  2.6.1 ls
esptool    esptool.py
➜  2.6.1 ls -la
total 7904
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 .
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 ..
-rwxr-xr-x  1 samsongenet  staff  3897939 Feb 14  2019 esptool
-rwxrwxrwx  1 samsongenet  staff   143623 Oct  2  2019 esptool.py
➜  2.6.1 ls -la
total 7904
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 .
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 ..
-rwxr-xr-x  1 samsongenet  staff  3897939 Feb 14  2019 esptool
-rwxrwxrwx  1 samsongenet  staff   143623 Oct  2  2019 esptool.py
➜  2.6.1 ls          
esptool    esptool.py
➜  2.6.1 chmod 441 esptool.py 
➜  2.6.1 ls -la
total 7904
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 .
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 ..
-rwxr-xr-x  1 samsongenet  staff  3897939 Feb 14  2019 esptool
-r--r----x  1 samsongenet  staff   143623 Oct  2  2019 esptool.py
➜  2.6.1 chmod 744 esptool.py
➜  2.6.1 ls -la
total 7904
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 .
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 ..
-rwxr-xr-x  1 samsongenet  staff  3897939 Feb 14  2019 esptool
-rwxr--r--  1 samsongenet  staff   143623 Oct  2  2019 esptool.py
➜  2.6.1 chmod 755 esptool.py
➜  2.6.1 ls -la
total 7904
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 .
drwxr-xr-x  4 samsongenet  staff      128 May  8 17:57 ..
-rwxr-xr-x  1 samsongenet  staff  3897939 Feb 14  2019 esptool
-rwxr-xr-x  1 samsongenet  staff   143623 Oct  2  2019 esptool.py
➜  2.6.1 env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=4740A411-CC06-4906-90D5-90EA1F8A4CC4
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/samsongenet/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1
OLDPWD=/Users/samsongenet
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  2.6.1 
Last login: Mon May  8 17:18:55 on ttys002
➜  ~ env               
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=148DC4FF-652F-4F09-9718-E162F9A83283
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/samsongenet
OLDPWD=/Users/samsongenet
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  ~ export PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  ~ env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=148DC4FF-652F-4F09-9718-E162F9A83283
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/samsongenet
OLDPWD=/Users/samsongenet
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  ~ cd ../../
➜  / ls 
Applications Library      System       Users        Volumes      bin          cores        dev          etc          home         opt          private      sbin         tmp          usr          var
➜  / cd Applications 
➜  /Applications ls
Adobe Illustrator CC 2019                               Google Drive.app                                        SketchUp 2020
Adobe InDesign CC 2019                                  Google Earth Pro.app                                    SlicerForFusion360.app
Adobe Photoshop CC 2019                                 Google Sheets.app                                       Spaze .sketch
Adobe Photoshop CC 2019 v20.0.4 Pre-Patched [TNT]       Google Slides.app                                       Spotify.app
Adobe Photoshop CC 2019 v20.0.4 Pre-Patched [TNT] alias HP Easy Scan.app                                        Stremio.app
Arduino.app                                             Inkscape                                                The Unarchiver.app
Audacity.app                                            Inkscape alias                                          Transmission
Autodesk Fusion 360 Installer                           Inkscape.app                                            Ultimaker Cura.app
Backup and Sync.app                                     Install Google Earth Pro 7.3.3.7786.pkg                 Utilities
Blender                                                 Keynote.app                                             VLC media player
Blender.app                                             KiCad                                                   VLC.app
CH34xVCPDriver.app                                      LightBurn.app                                           Wacom Tablet.localized
Epic Games Launcher.app                                 NordVPN IKE.app                                         WhatsApp 2.app
Fritzing                                                Numbers.app                                             WhatsApp.app
Fritzing.app                                            Original Prusa Drivers                                  audacity-macos-3.1.3-Intel
GarageBand.app                                          Pages.app                                               iMovie.app
Google Chrome.app                                       Python 2.7                                              micropython-1.20.0
Google Docs.app                                         Safari.app                                              zoom.us.app
➜  /Applications cd Arduino.app 
➜  Arduino.app ls
Contents
➜  Arduino.app open -a Arduino
➜  Arduino.app export PATH=/usr/local/bin/python:/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  Arduino.app env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=148DC4FF-652F-4F09-9718-E162F9A83283
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/usr/local/bin/python:/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Applications/Arduino.app
OLDPWD=/Applications
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  Arduino.app open -a Arduino
➜  Arduino.app open -a Arduino
➜  Arduino.app pip env
ERROR: unknown command "env"
➜  Arduino.app pip list
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package    Version
---------- -------
pip        19.2.3 
setuptools 41.2.0 
WARNING: You are using pip version 19.2.3, however version 20.3.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
➜  Arduino.app 
Last login: Mon May  8 12:14:38 on console
➜  ~ /Users/samsongenet/fabacademy/sam
zsh: no such file or directory: /Users/samsongenet/fabacademy/sam
➜  ~ /Users/samsongenet/fabacademy/samson-genet 
➜  samson-genet git:(main) ✗ mkdocs serve 
WARNING  -  Config value 'extra_java': Unrecognised configuration name:
            extra_java
INFO     -  Building documentation...
INFO     -  Cleaning site directory
WARNING  -  Documentation file 'assignments/week04.md' contains a link to
            'images/week04/group/1.jpp' which is not found in the documentation
            files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/6.jpg' which is not found in the documentation files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/Kicad/3.jpg' which is not found in the documentation
            files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/Kicad/12.jpg' which is not found in the documentation
            files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/Sickerillo.sch' which is not found in the
            documentation files.
WARNING  -  Documentation file 'assignments/week07.md' contains a link to
            'images/week07/Instructions/18.jpeg' which is not found in the
            documentation files.
WARNING  -  Documentation file 'assignments/week07.md' contains a link to
            'images/week07/modeling/8.jpg' which is not found in the
            documentation files.
WARNING  -  Documentation file 'assignments/week08.md' contains a link to
            'images/week08/group/3.jpg' which is not found in the documentation
            files.
INFO     -  Documentation built in 2.03 seconds
INFO     -  [15:05:19] Watching paths for changes: 'docs', 'mkdocs.yml'
INFO     -  [15:05:19] Serving on
            http://127.0.0.1:8000/fabacademy-student-template/
INFO     -  [15:05:25] Browser connected:
            http://127.0.0.1:8000/fabacademy-student-template/
INFO     -  [15:05:26] Browser connected:
            http://127.0.0.1:8000/fabacademy-student-template/
INFO     -  [15:06:09] Detected file changes
INFO     -  Building documentation...
WARNING  -  Config value 'extra_java': Unrecognised configuration name:
            extra_java
WARNING  -  Documentation file 'assignments/week04.md' contains a link to
            'images/week04/group/1.jpp' which is not found in the documentation
            files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/6.jpg' which is not found in the documentation files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/Kicad/3.jpg' which is not found in the documentation
            files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/Kicad/12.jpg' which is not found in the documentation
            files.
WARNING  -  Documentation file 'assignments/week06.md' contains a link to
            'images/week06/Sickerillo.sch' which is not found in the
            documentation files.
WARNING  -  Documentation file 'assignments/week07.md' contains a link to
            'images/week07/Instructions/18.jpeg' which is not found in the
            documentation files.
WARNING  -  Documentation file 'assignments/week07.md' contains a link to
            'images/week07/modeling/8.jpg' which is not found in the
            documentation files.
WARNING  -  Documentation file 'assignments/week08.md' contains a link to
            'images/week08/group/3.jpg' which is not found in the documentation
            files.
INFO     -  [15:06:11] Reloading browsers
INFO     -  [15:06:12] Browser connected:
            http://127.0.0.1:8000/fabacademy-student-template/assignments/week14/
ls
^CINFO     -  Shutting down...
➜  samson-genet git:(main) ✗ 
➜  samson-genet git:(main) ✗ ls
README.md        docs             requirements.txt
Students.md      mkdocs.yml
➜  samson-genet git:(main) ✗ cd
➜  ~ ls
Applications   Fusion 360 CAM Pictures       index.html     test
Controller.txt Google Drive   Public         jsconfig.json
Desktop        Library        bin            libraries
Documents      Movies         fabacademy     sketch.js
Downloads      Music          gaatjes.txt    style.css
➜  ~ arduino
zsh: command not found: arduino
➜  ~ arduino --version 
zsh: command not found: arduino
➜  ~ ls
Applications   Fusion 360 CAM Pictures       index.html     test
Controller.txt Google Drive   Public         jsconfig.json
Desktop        Library        bin            libraries
Documents      Movies         fabacademy     sketch.js
Downloads      Music          gaatjes.txt    style.css
➜  ~ cd 
➜  ~ ls
Applications   Fusion 360 CAM Pictures       index.html     test
Controller.txt Google Drive   Public         jsconfig.json
Desktop        Library        bin            libraries
Documents      Movies         fabacademy     sketch.js
Downloads      Music          gaatjes.txt    style.css
➜  ~ ls
Applications   Fusion 360 CAM Pictures       index.html     test
Controller.txt Google Drive   Public         jsconfig.json
Desktop        Library        bin            libraries
Documents      Movies         fabacademy     sketch.js
Downloads      Music          gaatjes.txt    style.css
➜  ~ env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/samsongenet
OLDPWD=/Users/samsongenet
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  ~ echo $PATH
/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  ~ env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/samsongenet
OLDPWD=/Users/samsongenet
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  ~ qls
zsh: command not found: qls
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ python3 --version
Python 3.9.6
➜  ~ python --version
zsh: command not found: python
➜  ~ python2 --version
zsh: command not found: python2
➜  ~ pythpon
zsh: command not found: pythpon
➜  ~ python
zsh: command not found: python
➜  ~ brew install python2
Running `brew update --auto-update`...
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################### 100.0%
Warning: No available formula with the name "python2". Did you mean ipython, bpython, jython or cython?
==> Searching for similarly named formulae and casks...
==> Formulae
ipython                           bpython                           jython                            cython

To install ipython, run:
  brew install ipython
➜  ~ echo $PATH
/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  ~ sed -i -e 's/=python /=python3 /g' ~/Library/Arduino15/packages/esp32/hardware/esp32/*/platform.txtc
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ brew install Python 2.7.18
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

Warning: No available formula with the name "2.7.18".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for 2.7.18.
➜  ~ brew update
brew install pyenv
Already up-to-date.
==> Fetching dependencies for pyenv: autoconf and openssl@3
==> Fetching autoconf
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.71
############################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:de8f4aa4123d307ad8bb11b1c685538224dc39939085fd00af928c5099c4202
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:de8f4aa4123d307ad8bb11b1c685538224dc39939085fd00a
############################################################################################################################### 100.0%
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.0
############################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:a6327ea42283c5fdc582b431da337a6aa371ed9ca019e1ca9d8a40e273535a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a6327ea42283c5fdc582b431da337a6aa371ed9ca019e1ca9
############################################################################################################################### 100.0%
==> Fetching pyenv
==> Downloading https://ghcr.io/v2/homebrew/core/pyenv/manifests/2.3.17
############################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:86090438471b2fd52d9b953c934fd06dccac8ce87a90859b238ad2c99a590f7a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:86090438471b2fd52d9b953c934fd06dccac8ce87a90859b2
############################################################################################################################### 100.0%
==> Installing dependencies for pyenv: autoconf and openssl@3
==> Installing pyenv dependency: autoconf
==> Pouring autoconf--2.71.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/autoconf/2.71: 71 files, 3.2MB
==> Installing pyenv dependency: openssl@3
==> Pouring openssl@3--3.1.0.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/openssl@3/3.1.0: 6,494 files, 29.9MB
==> Installing pyenv
==> Pouring pyenv--2.3.17.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/pyenv/2.3.17: 1,066 files, 3.3MB
==> Running `brew cleanup pyenv`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/samsongenet/Library/Caches/Homebrew/aom--3.5.0_2... (4.5MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/cmocka--1.1.5... (52.6KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/dav1d--1.0.0... (751.8KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/ffmpeg--5.1.2_4... (19.6MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/fontconfig--2.14.1... (625.1KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/freetype--2.12.1... (920.0KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/ghostscript--10.0.0... (49.7MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/glib--2.74.5... (6.2MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/gnutls--3.7.8_1... (3MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/guile--3.0.8_4... (13.7MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/harfbuzz--6.0.0_1... (2.1MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/highway--1.0.3... (929KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/imagemagick--7.1.0-58_1... (10.2MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/imath--3.1.6... (182.6KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/jpeg-turbo--2.1.4... (916.3KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/jpeg-xl--0.8.0... (6.2MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libass--0.17.0... (236.2KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libde265--1.0.9... (694.5KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libheif--1.14.2_1... (1.3MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libnghttp2--1.51.0... (212.4KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libomp--15.0.7... (552.6KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libtiff--4.4.0_1... (1.2MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libvidstab--1.1.0... (45.5KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libvpx--1.12.0... (1.8MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/libx11--1.8.3... (2.2MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/mbedtls--3.3.0... (3.0MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/mpg123--1.31.2... (616.0KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/ncdu--2.2.1... (257.9KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/openexr--3.1.5... (1.4MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/openssl@1.1--1.1.1s... (5.2MB)
Removing: /usr/local/Cellar/openssl@3/3.0.7... (6,454 files, 28.3MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/openssl@3--3.0.7... (7.7MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/pango--1.50.12... (771.6KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/pipenv--2022.12.19... (14.4MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/python@3.11--3.11.1... (15.3MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/rav1e--0.6.3... (46.6MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/rubberband--3.1.2... (572.2KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/sdl2--2.26.2... (1.8MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/snappy--1.1.9... (43.6KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/sqlite--3.40.1... (2MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/svt-av1--1.4.1... (2.8MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/tesseract--5.3.0_1... (12.6MB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/xz--5.4.1... (503.8KB)
Removing: /Users/samsongenet/Library/Caches/Homebrew/zstd--1.5.2... (900KB)
Removing: /Users/samsongenet/Library/Logs/Homebrew/rubberband... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/cjson... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/lame... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/pkg-config... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libheif... (203B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libtiff... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libtool... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/gmp... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/aribb24... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/wget... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/ffmpeg... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/xorgproto... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libidn2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libunibreak... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/xvid... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/pipenv... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libxau... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/little-cms2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libpng... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/ncurses... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/ghostscript... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/frei0r... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/nettle... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/pixman... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/mpdecimal... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libxdmcp... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/opus... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/freetype... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/imath... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/cmocka... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libsamplerate... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libvorbis... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/mpg123... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libunistring... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/liblqr... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/pango... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/openjpeg... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/highway... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/zimg... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/brotli... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/bdw-gc... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/speex... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libogg... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/icu4c... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/shared-mime-info... (210B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/zeromq... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/harfbuzz... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libbluray... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/glib... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libxcb... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/readline... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/aom... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/mbedtls... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libde265... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/lz4... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/graphite2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libarchive... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/srt... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/tesseract... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/cairo... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/webp... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/sqlite... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/fribidi... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/svt-av1... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/xz... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libnghttp2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/openexr... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/fontconfig... (1.6KB)
Removing: /Users/samsongenet/Library/Logs/Homebrew/giflib... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libvpx... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libxrender... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/librist... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libb2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/snappy... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/flac... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libvmaf... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/openssl@3... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/ca-certificates... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/gettext... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/zstd... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libsodium... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/jbig2dec... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/dav1d... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/opencore-amr... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/rav1e... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libxext... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/m4... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libtasn1... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libraw... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/pcre2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libevent... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/openssl@1.1... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/leptonica... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/x264... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/jpeg-xl... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libidn... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libvidstab... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/x265... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libsoxr... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libomp... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/unbound... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/ncdu... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/theora... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/sdl2... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/python@3.11... (2 files, 2.5KB)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libass... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/imagemagick... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/guile... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libsndfile... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/jasper... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/p11-kit... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/libx11... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/lzo... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/jpeg-turbo... (64B)
Removing: /Users/samsongenet/Library/Logs/Homebrew/gnutls... (64B)
Pruned 0 symbolic links and 6 directories from /usr/local
➜  ~ pyenv install 2.7.10
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-2.7.10.tar.xz...
-> https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
Installing Python-2.7.10...
patching file ./Lib/site.py
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 12.6.2 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164248.15217
Results logged to /var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164248.15217.log

Last 10 log lines:
Python/random.c:110:19: note: did you mean 'py_getentropy'?
Python/random.c:102:1: note: 'py_getentropy' declared here
py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
^
Python/random.c:119:19: error: implicit declaration of function 'getentropy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            res = getentropy(buffer, len);
                  ^
2 errors generated.
make: *** [Python/random.o] Error 1
make: *** Waiting for unfinished jobs....
➜  ~ pyenv install 2.2.2 
python-build: definition not found: 2.2.2

The following versions contain `2.2.2' in the name:
  miniconda-2.2.2
  miniconda3-2.2.2

See all available versions with `pyenv install --list'.

If the version you need is missing, try upgrading pyenv:

  brew update && brew upgrade pyenv
➜  ~ pyenv install --list
Available versions:
  2.1.3
  2.2.3
  2.3.7
  2.4.0
  2.4.1
  2.4.2
  2.4.3
  2.4.4
  2.4.5
  2.4.6
  2.5.0
  2.5.1
  2.5.2
  2.5.3
  2.5.4
  2.5.5
  2.5.6
  2.6.0
  2.6.1
  2.6.2
  2.6.3
  2.6.4
  2.6.5
  2.6.6
  2.6.7
  2.6.8
  2.6.9
  2.7.0
  2.7-dev
  2.7.1
  2.7.2
  2.7.3
  2.7.4
  2.7.5
  2.7.6
  2.7.7
  2.7.8
  2.7.9
  2.7.10
  2.7.11
  2.7.12
  2.7.13
  2.7.14
  2.7.15
  2.7.16
  2.7.17
  2.7.18
  3.0.1
  3.1.0
  3.1.1
  3.1.2
  3.1.3
  3.1.4
  3.1.5
  3.2.0
  3.2.1
  3.2.2
  3.2.3
  3.2.4
  3.2.5
  3.2.6
  3.3.0
  3.3.1
  3.3.2
  3.3.3
  3.3.4
  3.3.5
  3.3.6
  3.3.7
  3.4.0
  3.4-dev
  3.4.1
  3.4.2
  3.4.3
  3.4.4
  3.4.5
  3.4.6
  3.4.7
  3.4.8
  3.4.9
  3.4.10
  3.5.0
  3.5-dev
  3.5.1
  3.5.2
  3.5.3
  3.5.4
  3.5.5
  3.5.6
  3.5.7
  3.5.8
  3.5.9
  3.5.10
  3.6.0
  3.6-dev
  3.6.1
  3.6.2
  3.6.3
  3.6.4
  3.6.5
  3.6.6
  3.6.7
  3.6.8
  3.6.9
  3.6.10
  3.6.11
  3.6.12
  3.6.13
  3.6.14
  3.6.15
  3.7.0
  3.7-dev
  3.7.1
  3.7.2
  3.7.3
  3.7.4
  3.7.5
  3.7.6
  3.7.7
  3.7.8
  3.7.9
  3.7.10
  3.7.11
  3.7.12
  3.7.13
  3.7.14
  3.7.15
  3.7.16
  3.8.0
  3.8-dev
  3.8.1
  3.8.2
  3.8.3
  3.8.4
  3.8.5
  3.8.6
  3.8.7
  3.8.8
  3.8.9
  3.8.10
  3.8.11
  3.8.12
  3.8.13
  3.8.14
  3.8.15
  3.8.16
  3.9.0
  3.9-dev
  3.9.1
  3.9.2
  3.9.4
  3.9.5
  3.9.6
  3.9.7
  3.9.8
  3.9.9
  3.9.10
  3.9.11
  3.9.12
  3.9.13
  3.9.14
  3.9.15
  3.9.16
  3.10.0
  3.10-dev
  3.10.1
  3.10.2
  3.10.3
  3.10.4
  3.10.5
  3.10.6
  3.10.7
  3.10.8
  3.10.9
  3.10.10
  3.10.11
  3.11.0
  3.11-dev
  3.11.1
  3.11.2
  3.11.3
  3.12.0a7
  3.12-dev
  activepython-2.7.14
  activepython-3.5.4
  activepython-3.6.0
  anaconda-1.4.0
  anaconda-1.5.0
  anaconda-1.5.1
  anaconda-1.6.0
  anaconda-1.6.1
  anaconda-1.7.0
  anaconda-1.8.0
  anaconda-1.9.0
  anaconda-1.9.1
  anaconda-1.9.2
  anaconda-2.0.0
  anaconda-2.0.1
  anaconda-2.1.0
  anaconda-2.2.0
  anaconda-2.3.0
  anaconda-2.4.0
  anaconda-4.0.0
  anaconda2-2.4.0
  anaconda2-2.4.1
  anaconda2-2.5.0
  anaconda2-4.0.0
  anaconda2-4.1.0
  anaconda2-4.1.1
  anaconda2-4.2.0
  anaconda2-4.3.0
  anaconda2-4.3.1
  anaconda2-4.4.0
  anaconda2-5.0.0
  anaconda2-5.0.1
  anaconda2-5.1.0
  anaconda2-5.2.0
  anaconda2-5.3.0
  anaconda2-5.3.1
  anaconda2-2018.12
  anaconda2-2019.03
  anaconda2-2019.07
  anaconda2-2019.10
  anaconda3-2.0.0
  anaconda3-2.0.1
  anaconda3-2.1.0
  anaconda3-2.2.0
  anaconda3-2.3.0
  anaconda3-2.4.0
  anaconda3-2.4.1
  anaconda3-2.5.0
  anaconda3-4.0.0
  anaconda3-4.1.0
  anaconda3-4.1.1
  anaconda3-4.2.0
  anaconda3-4.3.0
  anaconda3-4.3.1
  anaconda3-4.4.0
  anaconda3-5.0.0
  anaconda3-5.0.1
  anaconda3-5.1.0
  anaconda3-5.2.0
  anaconda3-5.3.0
  anaconda3-5.3.1
  anaconda3-2018.12
  anaconda3-2019.03
  anaconda3-2019.07
  anaconda3-2019.10
  anaconda3-2020.02
  anaconda3-2020.07
  anaconda3-2020.11
  anaconda3-2021.04
  anaconda3-2021.05
  anaconda3-2021.11
  anaconda3-2022.05
  anaconda3-2022.10
  anaconda3-2023.03
  cinder-3.8-dev
  graalpy-22.3.0
  graalpython-20.1.0
  graalpython-20.2.0
  graalpython-20.3.0
  graalpython-21.0.0
  graalpython-21.1.0
  graalpython-21.2.0
  graalpython-21.3.0
  graalpython-22.0.0
  graalpython-22.1.0
  graalpython-22.2.0
  ironpython-dev
  ironpython-2.7.4
  ironpython-2.7.5
  ironpython-2.7.6.3
  ironpython-2.7.7
  jython-dev
  jython-2.5.0
  jython-2.5-dev
  jython-2.5.1
  jython-2.5.2
  jython-2.5.3
  jython-2.5.4-rc1
  jython-2.7.0
  jython-2.7.1
  jython-2.7.2
  mambaforge-pypy3
  mambaforge
  mambaforge-4.10.1-4
  mambaforge-4.10.1-5
  mambaforge-4.10.2-0
  mambaforge-4.10.3-0
  mambaforge-4.10.3-1
  mambaforge-4.10.3-2
  mambaforge-4.10.3-3
  mambaforge-4.10.3-4
  mambaforge-4.10.3-5
  mambaforge-4.10.3-6
  mambaforge-4.10.3-7
  mambaforge-4.10.3-8
  mambaforge-4.10.3-9
  mambaforge-4.10.3-10
  mambaforge-4.11.0-0
  mambaforge-4.11.0-1
  mambaforge-4.11.0-2
  mambaforge-4.11.0-3
  mambaforge-4.11.0-4
  mambaforge-4.12.0-0
  mambaforge-4.12.0-1
  mambaforge-4.12.0-2
  mambaforge-4.12.0-3
  mambaforge-4.13.0-1
  mambaforge-4.14.0-0
  mambaforge-4.14.0-1
  mambaforge-4.14.0-2
  mambaforge-22.9.0-0
  mambaforge-22.9.0-1
  mambaforge-22.9.0-2
  mambaforge-22.9.0-3
  micropython-dev
  micropython-1.9.3
  micropython-1.9.4
  micropython-1.10
  micropython-1.11
  micropython-1.12
  micropython-1.13
  micropython-1.14
  micropython-1.15
  micropython-1.16
  micropython-1.17
  micropython-1.18
  micropython-1.19.1
  miniconda-latest
  miniconda-2.2.2
  miniconda-3.0.0
  miniconda-3.0.4
  miniconda-3.0.5
  miniconda-3.3.0
  miniconda-3.4.2
  miniconda-3.7.0
  miniconda-3.8.3
  miniconda-3.9.1
  miniconda-3.10.1
  miniconda-3.16.0
  miniconda-3.18.3
  miniconda2-latest
  miniconda2-2.7-4.8.3
  miniconda2-3.18.3
  miniconda2-3.19.0
  miniconda2-4.0.5
  miniconda2-4.1.11
  miniconda2-4.3.14
  miniconda2-4.3.21
  miniconda2-4.3.27
  miniconda2-4.3.30
  miniconda2-4.3.31
  miniconda2-4.4.10
  miniconda2-4.5.1
  miniconda2-4.5.4
  miniconda2-4.5.11
  miniconda2-4.5.12
  miniconda2-4.6.14
  miniconda2-4.7.10
  miniconda2-4.7.12
  miniconda3-latest
  miniconda3-2.2.2
  miniconda3-3.0.0
  miniconda3-3.0.4
  miniconda3-3.0.5
  miniconda3-3.3.0
  miniconda3-3.4.2
  miniconda3-3.7.0
  miniconda3-3.7-4.8.2
  miniconda3-3.7-4.8.3
  miniconda3-3.7-4.9.2
  miniconda3-3.7-4.10.1
  miniconda3-3.7-4.10.3
  miniconda3-3.7-4.11.0
  miniconda3-3.7-4.12.0
  miniconda3-3.7-22.11.1-1
  miniconda3-3.7-23.1.0-1
  miniconda3-3.8.3
  miniconda3-3.8-4.8.2
  miniconda3-3.8-4.8.3
  miniconda3-3.8-4.9.2
  miniconda3-3.8-4.10.1
  miniconda3-3.8-4.10.3
  miniconda3-3.8-4.11.0
  miniconda3-3.8-4.12.0
  miniconda3-3.8-22.11.1-1
  miniconda3-3.8-23.1.0-1
  miniconda3-3.9.1
  miniconda3-3.9-4.9.2
  miniconda3-3.9-4.10.1
  miniconda3-3.9-4.10.3
  miniconda3-3.9-4.11.0
  miniconda3-3.9-4.12.0
  miniconda3-3.9-22.11.1-1
  miniconda3-3.9-23.1.0-1
  miniconda3-3.10.1
  miniconda3-3.10-22.11.1-1
  miniconda3-3.10-23.1.0-1
  miniconda3-3.16.0
  miniconda3-3.18.3
  miniconda3-3.19.0
  miniconda3-4.0.5
  miniconda3-4.1.11
  miniconda3-4.2.12
  miniconda3-4.3.11
  miniconda3-4.3.14
  miniconda3-4.3.21
  miniconda3-4.3.27
  miniconda3-4.3.30
  miniconda3-4.3.31
  miniconda3-4.4.10
  miniconda3-4.5.1
  miniconda3-4.5.4
  miniconda3-4.5.11
  miniconda3-4.5.12
  miniconda3-4.6.14
  miniconda3-4.7.10
  miniconda3-4.7.12
  miniforge-pypy3
  miniforge3-latest
  miniforge3-4.9.2
  miniforge3-4.10
  miniforge3-4.10.1-1
  miniforge3-4.10.1-3
  miniforge3-4.10.1-5
  miniforge3-4.10.2-0
  miniforge3-4.10.3-0
  miniforge3-4.10.3-1
  miniforge3-4.10.3-2
  miniforge3-4.10.3-3
  miniforge3-4.10.3-4
  miniforge3-4.10.3-5
  miniforge3-4.10.3-6
  miniforge3-4.10.3-7
  miniforge3-4.10.3-8
  miniforge3-4.10.3-9
  miniforge3-4.10.3-10
  miniforge3-4.11.0-0
  miniforge3-4.11.0-1
  miniforge3-4.11.0-2
  miniforge3-4.11.0-3
  miniforge3-4.11.0-4
  miniforge3-4.12.0-0
  miniforge3-4.12.0-1
  miniforge3-4.12.0-2
  miniforge3-4.12.0-3
  miniforge3-4.13.0-0
  miniforge3-4.13.0-1
  miniforge3-4.14.0-0
  miniforge3-4.14.0-1
  miniforge3-4.14.0-2
  miniforge3-22.9.0-0
  miniforge3-22.9.0-1
  miniforge3-22.9.0-2
  miniforge3-22.9.0-3
  miniforge3-22.11.1-4
  nogil-3.9.10
  nogil-3.9.10-1
  pypy-c-jit-latest
  pypy-dev
  pypy-stm-2.3
  pypy-stm-2.5.1
  pypy-1.5-src
  pypy-1.6
  pypy-1.7
  pypy-1.8
  pypy-1.9
  pypy-2.0-src
  pypy-2.0
  pypy-2.0.1-src
  pypy-2.0.1
  pypy-2.0.2-src
  pypy-2.0.2
  pypy-2.1-src
  pypy-2.1
  pypy-2.2-src
  pypy-2.2
  pypy-2.2.1-src
  pypy-2.2.1
  pypy-2.3-src
  pypy-2.3
  pypy-2.3.1-src
  pypy-2.3.1
  pypy-2.4.0-src
  pypy-2.4.0
  pypy-2.5.0-src
  pypy-2.5.0
  pypy-2.5.1-src
  pypy-2.5.1
  pypy-2.6.0-src
  pypy-2.6.0
  pypy-2.6.1-src
  pypy-2.6.1
  pypy-4.0.0-src
  pypy-4.0.0
  pypy-4.0.1-src
  pypy-4.0.1
  pypy-5.0.0-src
  pypy-5.0.0
  pypy-5.0.1-src
  pypy-5.0.1
  pypy-5.1-src
  pypy-5.1
  pypy-5.1.1-src
  pypy-5.1.1
  pypy-5.3-src
  pypy-5.3
  pypy-5.3.1-src
  pypy-5.3.1
  pypy-5.4-src
  pypy-5.4
  pypy-5.4.1-src
  pypy-5.4.1
  pypy-5.6.0-src
  pypy-5.6.0
  pypy-5.7.0-src
  pypy-5.7.0
  pypy-5.7.1-src
  pypy-5.7.1
  pypy2-5.3-src
  pypy2-5.3
  pypy2-5.3.1-src
  pypy2-5.3.1
  pypy2-5.4-src
  pypy2-5.4
  pypy2-5.4.1-src
  pypy2-5.4.1
  pypy2-5.6.0-src
  pypy2-5.6.0
  pypy2-5.7.0-src
  pypy2-5.7.0
  pypy2-5.7.1-src
  pypy2-5.7.1
  pypy2.7-5.8.0-src
  pypy2.7-5.8.0
  pypy2.7-5.9.0-src
  pypy2.7-5.9.0
  pypy2.7-5.10.0-src
  pypy2.7-5.10.0
  pypy2.7-6.0.0-src
  pypy2.7-6.0.0
  pypy2.7-7.0.0-src
  pypy2.7-7.0.0
  pypy2.7-7.1.0-src
  pypy2.7-7.1.0
  pypy2.7-7.1.1-src
  pypy2.7-7.1.1
  pypy2.7-7.2.0-src
  pypy2.7-7.2.0
  pypy2.7-7.3.0-src
  pypy2.7-7.3.0
  pypy2.7-7.3.1-src
  pypy2.7-7.3.1
  pypy2.7-7.3.2-src
  pypy2.7-7.3.2
  pypy2.7-7.3.3-src
  pypy2.7-7.3.3
  pypy2.7-7.3.4-src
  pypy2.7-7.3.4
  pypy2.7-7.3.5-src
  pypy2.7-7.3.5
  pypy2.7-7.3.6-src
  pypy2.7-7.3.6
  pypy2.7-7.3.8-src
  pypy2.7-7.3.8
  pypy2.7-7.3.9-src
  pypy2.7-7.3.9
  pypy2.7-7.3.10-src
  pypy2.7-7.3.10
  pypy2.7-7.3.11-src
  pypy2.7-7.3.11
  pypy3-2.3.1-src
  pypy3-2.3.1
  pypy3-2.4.0-src
  pypy3-2.4.0
  pypy3.3-5.2-alpha1-src
  pypy3.3-5.2-alpha1
  pypy3.3-5.5-alpha-src
  pypy3.3-5.5-alpha
  pypy3.5-c-jit-latest
  pypy3.5-5.7-beta-src
  pypy3.5-5.7-beta
  pypy3.5-5.7.1-beta-src
  pypy3.5-5.7.1-beta
  pypy3.5-5.8.0-src
  pypy3.5-5.8.0
  pypy3.5-5.9.0-src
  pypy3.5-5.9.0
  pypy3.5-5.10.0-src
  pypy3.5-5.10.0
  pypy3.5-5.10.1-src
  pypy3.5-5.10.1
  pypy3.5-6.0.0-src
  pypy3.5-6.0.0
  pypy3.5-7.0.0-src
  pypy3.5-7.0.0
  pypy3.6-7.0.0-src
  pypy3.6-7.0.0
  pypy3.6-7.1.0-src
  pypy3.6-7.1.0
  pypy3.6-7.1.1-src
  pypy3.6-7.1.1
  pypy3.6-7.2.0-src
  pypy3.6-7.2.0
  pypy3.6-7.3.0-src
  pypy3.6-7.3.0
  pypy3.6-7.3.1-src
  pypy3.6-7.3.1
  pypy3.6-7.3.2-src
  pypy3.6-7.3.2
  pypy3.6-7.3.3-src
  pypy3.6-7.3.3
  pypy3.7-c-jit-latest
  pypy3.7-7.3.2-src
  pypy3.7-7.3.2
  pypy3.7-7.3.3-src
  pypy3.7-7.3.3
  pypy3.7-7.3.4-src
  pypy3.7-7.3.4
  pypy3.7-7.3.5-src
  pypy3.7-7.3.5
  pypy3.7-7.3.6-src
  pypy3.7-7.3.6
  pypy3.7-7.3.7-src
  pypy3.7-7.3.7
  pypy3.7-7.3.8-src
  pypy3.7-7.3.8
  pypy3.7-7.3.9-src
  pypy3.7-7.3.9
  pypy3.8-7.3.6-src
  pypy3.8-7.3.6
  pypy3.8-7.3.7-src
  pypy3.8-7.3.7
  pypy3.8-7.3.8-src
  pypy3.8-7.3.8
  pypy3.8-7.3.9-src
  pypy3.8-7.3.9
  pypy3.8-7.3.10-src
  pypy3.8-7.3.10
  pypy3.8-7.3.11-src
  pypy3.8-7.3.11
  pypy3.9-7.3.8-src
  pypy3.9-7.3.8
  pypy3.9-7.3.9-src
  pypy3.9-7.3.9
  pypy3.9-7.3.10-src
  pypy3.9-7.3.10
  pypy3.9-7.3.11-src
  pypy3.9-7.3.11
  pyston-2.2
  pyston-2.3
  pyston-2.3.1
  pyston-2.3.2
  pyston-2.3.3
  pyston-2.3.4
  pyston-2.3.5
  stackless-dev
  stackless-2.7-dev
  stackless-2.7.2
  stackless-2.7.3
  stackless-2.7.4
  stackless-2.7.5
  stackless-2.7.6
  stackless-2.7.7
  stackless-2.7.8
  stackless-2.7.9
  stackless-2.7.10
  stackless-2.7.11
  stackless-2.7.12
  stackless-2.7.14
  stackless-2.7.16
  stackless-3.2.2
  stackless-3.2.5
  stackless-3.3.5
  stackless-3.3.7
  stackless-3.4-dev
  stackless-3.4.2
  stackless-3.4.7
  stackless-3.5.4
  stackless-3.7.5
➜  ~ pyenv install 2.2.3 
python-build: use readline from homebrew
Downloading Python-2.2.3.tar.gz...
-> https://www.python.org/ftp/python/2.2.3/Python-2.2.3.tgz
Installing Python-2.2.3...
patching file setup.py
python-build: use readline from homebrew

BUILD FAILED (OS X 12.6.2 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164954.22523
Results logged to /var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164954.22523.log

Last 10 log lines:
2 errors generated.
2 errors generated.
2 errors generated.
make: *** [Parser/grammar1.o] Error 1
make: *** [Parser/node.o] Error 1
make: *** [Modules/python.o] Error 1
make: *** [Parser/myreadline.o] Error 1
make: *** [Parser/parser.o] Error 1
2 errors generated.
make: *** [Objects/abstract.o] Error 1
➜  ~ cat /var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164954.22523.log
/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164954.22523 ~
/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164954.22523/Python-2.2.3 /var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/python-build.20230508164954.22523 ~
creating cache ./config.cache
checking MACHDEP... darwin
checking for --without-gcc... no
checking for --with-cxx=<compiler>... no
checking for c++... c++
checking whether the C++ compiler (c++  -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/samsongenet/.pyenv/versions/2.2.3/lib -Wl,-rpath,/Users/samsongenet/.pyenv/versions/2.2.3/lib) works... yes
checking whether the C++ compiler (c++  -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/samsongenet/.pyenv/versions/2.2.3/lib -Wl,-rpath,/Users/samsongenet/.pyenv/versions/2.2.3/lib) is a cross-compiler... no
checking for gcc... /usr/bin/gcc
checking whether the C compiler (/usr/bin/gcc  -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/samsongenet/.pyenv/versions/2.2.3/lib -Wl,-rpath,/Users/samsongenet/.pyenv/versions/2.2.3/lib) works... yes
checking whether the C compiler (/usr/bin/gcc  -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/samsongenet/.pyenv/versions/2.2.3/lib -Wl,-rpath,/Users/samsongenet/.pyenv/versions/2.2.3/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether /usr/bin/gcc accepts -g... yes
checking how to run the C preprocessor... /usr/bin/gcc -E
checking for AIX... no
checking for minix/config.h... no
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for executable suffix... rm: conftest.dSYM: is a directory
.dSYM
checking for --with-suffix... .dSYM
checking for case-insensitive build directory... yes
checking LIBRARY... libpython$(VERSION).a
checking LINKCC... $(PURIFY) $(CXX)
checking LDLIBRARY... libpython$(VERSION).a
checking for ranlib... ranlib
checking for ar... ar
checking for a BSD compatible install... /usr/bin/install -c
checking for --with-pydebug... no
checking whether /usr/bin/gcc accepts -OPT:Olimit=0... no
checking whether /usr/bin/gcc accepts -Olimit 1500... no
checking whether pthreads are available without options... no
checking whether /usr/bin/gcc accepts -Kpthread... no
checking for ANSI C header files... no
checking for dlfcn.h... yes
checking for fcntl.h... yes
checking for grp.h... yes
checking for limits.h... yes
checking for langinfo.h... yes
checking for locale.h... yes
checking for ncurses.h... yes
checking for poll.h... yes
checking for pthread.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for thread.h... no
checking for unistd.h... yes
checking for utime.h... yes
checking for termios.h... yes
checking for sys/audioio.h... no
checking for sys/file.h... yes
checking for sys/lock.h... yes
checking for sys/modem.h... no
checking for db_185.h... no
checking for db.h... yes
checking for sys/param.h... yes
checking for sys/poll.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for sys/un.h... yes
checking for sys/utsname.h... yes
checking for sys/wait.h... yes
checking for pty.h... no
checking for term.h... yes
checking for libutil.h... no
checking for ndbm.h... yes
checking for db1/ndbm.h... no
checking for gdbm/ndbm.h... no
checking for sys/resource.h... yes
checking for netpacket/packet.h... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for clock_t in time.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking size of int... 0
checking size of long... 0
checking size of void *... 0
checking size of char... 0
checking size of short... 0
checking size of float... 0
checking size of double... 0
checking size of fpos_t... 0
checking for long long support... yes
checking size of long long... 0
checking for uintptr_t support... no
checking size of off_t... 0
checking whether to enable large file support... no
checking size of time_t... 0
checking for pthread_t... yes
checking size of pthread_t... 0
checking for --enable-toolbox-glue... yes
checking for --enable-framework... no
checking for dyld... always on for Darwin
checking SO... .so
checking LDSHARED... $(CC) $(LDFLAGS) -bundle -bundle_loader $(BINDIR)/$(PYTHON)
checking CCSHARED... 
checking LINKFORSHARED... -u __dummy -u _PyMac_Error -framework System -framework CoreServices -framework Foundation
checking CFLAGSFORSHARED... 
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for --with-libs... no
checking for --with-signal-module... yes
checking for --with-dec-threads... no
checking for --with-threads... yes
checking for _POSIX_THREADS in unistd.h... yes
checking for mach/cthreads.h... no
checking for --with-pth... no
checking for pthread_create in -lpthread... checking for pthread_detach... yes
checking if PTHREAD_SCOPE_SYSTEM is supported... no
checking for pthread_sigmask... yes
checking for usconfig in -lmpc... no
checking for thr_create in -lthread... no
checking if --enable-ipv6 is specified... no
checking for --with-cycle-gc... yes
checking for --with-pymalloc... no
checking for --with-wctype-functions... no
checking for --with-sgi-dl... no
checking for --with-dl-dld... no
checking for dlopen... yes
checking DYNLOADFILE... dynload_next.o
checking MACHDEP_OBJS... MACHDEP_OBJS
checking for alarm... yes
checking for chown... yes
checking for chroot... yes
checking for clock... yes
checking for confstr... yes
checking for ctermid... yes
checking for ctermid_r... yes
checking for execv... yes
checking for flock... yes
checking for fork... yes
checking for fsync... yes
checking for fdatasync... yes
checking for fpathconf... yes
checking for ftime... yes
checking for ftruncate... yes
checking for gai_strerror... yes
checking for getgroups... yes
checking for getlogin... yes
checking for getpeername... yes
checking for getpid... yes
checking for getpwent... yes
checking for getwd... yes
checking for hstrerror... yes
checking for inet_pton... yes
checking for kill... yes
checking for link... yes
checking for lstat... yes
checking for mkfifo... yes
checking for mktime... yes
checking for mremap... no
checking for nice... yes
checking for pathconf... yes
checking for pause... yes
checking for plock... no
checking for poll... yes
checking for pthread_init... no
checking for putenv... yes
checking for readlink... yes
checking for select... yes
checking for setegid... yes
checking for seteuid... yes
checking for setgid... yes
checking for setgroups... yes
checking for setlocale... yes
checking for setregid... yes
checking for setreuid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setuid... yes
checking for setvbuf... yes
checking for snprintf... yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sigrelse... yes
checking for strftime... yes
checking for strptime... yes
checking for symlink... yes
checking for sysconf... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for tempnam... yes
checking for timegm... yes
checking for times... yes
checking for tmpfile... yes
checking for tmpnam... yes
checking for tmpnam_r... no
checking for truncate... yes
checking for uname... yes
checking for unsetenv... yes
checking for waitpid... yes
checking for _getpty... no
checking for getpriority... yes
checking for openpty... yes
checking for forkpty... yes
checking for fseek64... no
checking for fseeko... yes
checking for fstatvfs... yes
checking for ftell64... no
checking for ftello... yes
checking for statvfs... yes
checking for dup2... yes
checking for getcwd... yes
checking for strdup... yes
checking for strerror... yes
checking for memmove... yes
checking for getpgrp... yes
checking for setpgrp... yes
checking for gettimeofday... yes
checking for getaddrinfo... yes
checking getaddrinfo bug... buggy
checking for getnameinfo... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for st_rdev in struct stat... yes
checking for st_blksize in struct stat... yes
checking for st_blocks in struct stat... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both be included... yes
checking for addrinfo... yes
checking for sockaddr_storage... yes
checking whether char is unsigned... no
checking for working const... yes
checking for working volatile... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for bad exec* prototypes... no
checking if sockaddr has sa_len member... yes
checking for bad static forward... yes
checking whether va_list is an array... yes
checking for gethostbyname_r... no
checking for gethostbyname... yes
checking for __fpu_control... no
checking for __fpu_control in -lieee... no
checking for --with-fpectl... no
checking for --with-libm=STRING... default LIBM=""
checking for --with-libc=STRING... default LIBC=""
checking for hypot... yes
checking what malloc(0) returns... null
checking for wchar.h... yes
checking size of wchar_t... 0
checking what type to use for unicode... no type found
checking whether byte ordering is bigendian... no
checking whether right shift extends the sign bit... no
checking for getc_unlocked() and friends... yes
checking for rl_pre_input_hook in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking for broken nice()... no
checking whether mvwdelch is an expression... yes
checking whether WINDOW has _flags... no
checking for socklen_t... yes
checking for build directories... done
updating cache ./config.cache
creating ./config.status
creating Makefile.pre
creating Modules/Setup.config
creating pyconfig.h
creating Setup
creating Setup.local
creating Makefile
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Modules/python.o Modules/python.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/acceler.o Parser/acceler.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/grammar1.o Parser/grammar1.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/listnode.o Parser/listnode.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/node.o Parser/node.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/parser.o Parser/parser.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/parsetok.o Parser/parsetok.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/tokenizer.o Parser/tokenizer.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/bitset.o Parser/bitset.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/metagrammar.o Parser/metagrammar.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Parser/myreadline.o Parser/myreadline.c
/usr/bin/gcc -c -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -no-cpp-precomp -I. -I./Include -DHAVE_CONFIG_H  -o Objects/abstract.o Objects/abstract.c
In file included from Parser/acceler.c:13:
In file included from ./Include/pgenheaders.h:24:
In file included from ./Include/pymem.h:7:
In file included from In file included from ./Include/pyport.hIn file included from Parser/metagrammar.c::462Parser/bitset.cIn file included from In file included from :Parser/listnode.c2::Parser/tokenizer.c42Parser/parsetok.c4::
:: :
In file included from 44error: In file included from ./Include/pgenheaders.h:
:
"could not set LONG_MAX in pyport.h":./Include/pgenheaders.hIn file included from 
:
:#error "could not set LONG_MAX in pyport.h"24./Include/pgenheaders.hIn file included from 
In file included from ::
 ^./Include/pgenheaders.h./Include/pgenheaders.h24
In file included from :::
242424:
./Include/pymem.h:
:In file included from 7In file included from In file included from :
./Include/pymem.h./Include/pymem.h::In file included from 7:
./Include/pymem.h:
:7:
7./Include/pymem.h./Include/pyport.h:::
7462./Include/pyport.h::462:
:2./Include/pyport.h:: 2./Include/pyport.h: :error: error: ./Include/pyport.h"could not set LONG_MAX in pyport.h":
462:2:#error "could not set LONG_MAX in pyport.h" 462:
error: 2"could not set LONG_MAX in pyport.h":
 462#error "could not set LONG_MAX in pyport.h"
 ^
:"could not set LONG_MAX in pyport.h"
2: #error "could not set LONG_MAX in pyport.h"
 ^
error: error:  ^
"could not set LONG_MAX in pyport.h"
"could not set LONG_MAX in pyport.h"
#error "could not set LONG_MAX in pyport.h"
 ^
#error "could not set LONG_MAX in pyport.h"
 ^
1 error generated.
1 error generated.
1 error generated.
1 error generated.
In file included from Modules/python.c:3:
In file included from ./Include/Python.h:62:
./Include/pyport.h:480:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from Parser/node.c:3:
In file included from ./Include/Python.hIn file included from :Parser/myreadline.c:12:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
62 ^
In file included from :
In file included from ./Include/Python.h./Include/pyport.h:62:
./Include/pyport.hParser/grammar1.c::4:
In file included from ./Include/Python.h:62:
:480:2: 480:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from ./Include/pyport.h:480:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 ^
error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
Objects/abstract.c1 error#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 ^
 generated.
:4:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 ^
In file included from ./Include/Python.h:62:
./Include/pyport.h:480:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from Parser/parser.c:8:
In file included from ./Include/Python.h:62:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 ^
./Include/pyport.h:480:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 ^
make: *** [Parser/metagrammar.o] Error 1
1 error generated.
make: *** Waiting for unfinished jobs....
make: *** [Parser/bitset.o] Error 1
make: *** [Parser/listnode.o] Error 1
make: *** [Parser/acceler.o] Error 1
make: *** [Parser/parsetok.o] Error 1
In file included from Parser/grammar1.c:4:
In file included from ./Include/Python.h:71:
./Include/unicodeobject.h:131:9: error: unknown type name 'PY_UNICODE_TYPE'
typedef PY_UNICODE_TYPE Py_UNICODE;
        ^
In file included from Parser/node.c:3:
In file included from ./Include/Python.h:71:
./Include/unicodeobject.h:131:9: error: unknown type name 'PY_UNICODE_TYPE'
typedef PY_UNICODE_TYPE Py_UNICODE;
        ^
In file included from Objects/abstract.c:4:
In file included from ./Include/Python.h:71:
./Include/unicodeobject.h:131:9: error: unknown type name 'PY_UNICODE_TYPE'
In file included from Parser/parser.c:8:
In file included from ./Include/Python.h:71:
./Include/unicodeobject.h:131:9: error: unknown type name 'PY_UNICODE_TYPE'
typedef PY_UNICODE_TYPE Py_UNICODE;typedef PY_UNICODE_TYPE Py_UNICODE;

        ^        ^

In file included from Modules/python.c:3:
In file included from ./Include/Python.h:71:
./Include/unicodeobject.h:131:9: error: unknown type name 'PY_UNICODE_TYPE'
typedef PY_UNICODE_TYPE Py_UNICODE;
        ^
In file included from Parser/myreadline.c:12:
In file included from ./Include/Python.h:71:
./Include/unicodeobject.h:131:9: error: unknown type name 'PY_UNICODE_TYPE'
typedef PY_UNICODE_TYPE Py_UNICODE;
        ^
make: *** [Parser/tokenizer.o] Error 1
2 errors generated.
2 errors generated.
2 errors generated.
2 errors generated.
2 errors generated.
make: *** [Parser/grammar1.o] Error 1
make: *** [Parser/node.o] Error 1
make: *** [Modules/python.o] Error 1
make: *** [Parser/myreadline.o] Error 1
make: *** [Parser/parser.o] Error 1
2 errors generated.
make: *** [Objects/abstract.o] Error 1
➜  ~ python --version
zsh: command not found: python
➜  ~ brew install python2
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

Warning: No available formula with the name "python2". Did you mean ipython, bpython, jython or cython?
==> Searching for similarly named formulae and casks...
==> Formulae
ipython                           bpython                           jython                            cython

To install ipython, run:
  brew install ipython
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ cd ../..
➜  / ls
Applications System       Volumes      cores        etc          opt          sbin         usr
Library      Users        bin          dev          home         private      tmp          var
➜  / cd usr 
➜  /usr cd local/opt 
➜  opt ls
0mq              fribidi          jpeg-xl          libomp           libxcb           openssl@1.1      speex
aom              gettext          lame             libpng           libxdmcp         openssl@3        sqlite
aribb24          ghostscript      lcms2            libraw           libxext          openssl@3.1      sqlite3
autoconf         giflib           leptonica        librist          libxrender       opus             srt
autoconf@2.71    glib             libarchive       libsamplerate    little-cms2      p11-kit          svt-av1
bdw-gc           gmp              libass           libsndfile       lz4              pango            tesseract
boehmgc          gnutls           libb2            libsodium        lzo              pcre2            theora
brotli           graphite2        libbluray        libsoxr          m4               pipenv           unbound
ca-certificates  gs               libde265         libtasn          mbedtls          pixman           vid.stab
cairo            guile            libevent         libtasn1         mbedtls@3        pkg-config       webp
cjson            guile@3          libgc            libtiff          mpdecimal        pkgconfig        wget
cmocka           harfbuzz         libheif          libtool          mpg123           pyenv            x264
dav1d            highway          libidn           libunibreak      ncdu             python@3.11      x265
ffmpeg           icu4c            libidn2          libunistring     ncurses          pzstd            xorgproto
ffmpeg@5         imagemagick      libjpeg-turbo    libvidstab       nettle           rav1e            xvid
flac             imagemagick@7    liblqr           libvmaf          opencore-amr     readline         xz
fontconfig       imath            libmpdec         libvorbis        openexr          rubberband       zeromq
freetype         jasper           libnettle        libvpx           openexr@3        sdl2             zimg
freetype2        jbig2dec         libnghttp2       libx11           openjpeg         shared-mime-info zmq
frei0r           jpeg-turbo       libogg           libxau           openssl          snappy           zstd
➜  opt pwd            
/usr/local/opt
➜  opt env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/usr/local/opt
OLDPWD=/usr
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  opt cd
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ cd Applications 
➜  Applications ls
Autodesk Fusion 360 Service Utility.app Autodesk Fusion 360.app                 Remove Autodesk Fusion 360.app
➜  Applications cd 
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ cd Applications 
➜  Applications 
➜  Applications ls
Autodesk Fusion 360 Service Utility.app Autodesk Fusion 360.app                 Remove Autodesk Fusion 360.app
➜  Applications cd
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ cd ../..
➜  / ls
Applications System       Volumes      cores        etc          opt          sbin         usr
Library      Users        bin          dev          home         private      tmp          var
➜  / cd Users 
➜  /Users ls
Shared      samsongenet temp
➜  /Users cd cd
cd: no such file or directory: cd
➜  /Users ls
Shared      samsongenet temp
➜  /Users cd   
➜  ~ cd Applications 
➜  Applications l
total 0
drwx------@  6 samsongenet  staff   192B Apr 21 14:05 .
drwxr-xr-x+ 50 samsongenet  staff   1.6K May  8 17:08 ..
-rw-r--r--@  1 samsongenet  staff     0B Oct  8  2020 .localized
drwxr-xr-x   3 samsongenet  staff    96B Apr 21 14:05 Autodesk Fusion 360 Service Utility.app
drwxr-xr-x   3 samsongenet  staff    96B Apr 21 14:05 Autodesk Fusion 360.app
drwxr-xr-x   3 samsongenet  staff    96B Apr 21 14:05 Remove Autodesk Fusion 360.app
➜  Applications sls
zsh: command not found: sls
➜  Applications ls
Autodesk Fusion 360 Service Utility.app Autodesk Fusion 360.app                 Remove Autodesk Fusion 360.app
➜  Applications cd ../../..
➜  / ls
Applications System       Volumes      cores        etc          opt          sbin         usr
Library      Users        bin          dev          home         private      tmp          var
➜  / cd Applications 
➜  /Applications ls
Adobe Illustrator CC 2019                               Keynote.app
Adobe InDesign CC 2019                                  KiCad
Adobe Photoshop CC 2019                                 LightBurn.app
Adobe Photoshop CC 2019 v20.0.4 Pre-Patched [TNT]       NordVPN IKE.app
Adobe Photoshop CC 2019 v20.0.4 Pre-Patched [TNT] alias Numbers.app
Arduino.app                                             Original Prusa Drivers
Audacity.app                                            Pages.app
Autodesk Fusion 360 Installer                           Python 2.7
Backup and Sync.app                                     Safari.app
Blender                                                 SketchUp 2020
Blender.app                                             SlicerForFusion360.app
CH34xVCPDriver.app                                      Spaze .sketch
Epic Games Launcher.app                                 Spotify.app
Fritzing                                                Stremio.app
Fritzing.app                                            The Unarchiver.app
GarageBand.app                                          Transmission
Google Chrome.app                                       Ultimaker Cura.app
Google Docs.app                                         Utilities
Google Drive.app                                        VLC media player
Google Earth Pro.app                                    VLC.app
Google Sheets.app                                       Wacom Tablet.localized
Google Slides.app                                       WhatsApp 2.app
HP Easy Scan.app                                        WhatsApp.app
Inkscape                                                audacity-macos-3.1.3-Intel
Inkscape alias                                          iMovie.app
Inkscape.app                                            micropython-1.20.0
Install Google Earth Pro 7.3.3.7786.pkg                 zoom.us.app
➜  /Applications cd Python\ 2.7 
➜  Python 2.7 ls
Extras                       Install Certificates.command Python Launcher.app
IDLE.app                     License.rtf                  ReadMe.rtf
Icon?                        Python Documentation.html    Update Shell Profile.command
➜  Python 2.7 export PYTHONPATH=$PYTHONPATH:`pwd`
➜  Python 2.7 env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Applications/Python 2.7
OLDPWD=/Applications
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
PYTHONPATH=:/Applications/Python 2.7
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  Python 2.7 export PATH=$PYTHONPATH:`pwd` 
➜  Python 2.7 ls
zsh: command not found: ls
➜  Python 2.7 env
zsh: command not found: env
➜  Python 2.7 env
zsh: command not found: env
➜  Python 2.7 ls
zsh: command not found: ls
➜  Python 2.7 export /Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:n  
➜  Python 2.7 export PATH=$PYTHONPATH:/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  Python 2.7 ls
Extras                       Install Certificates.command Python Launcher.app
IDLE.app                     License.rtf                  ReadMe.rtf
Icon?                        Python Documentation.html    Update Shell Profile.command
➜  Python 2.7 env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=:/Applications/Python 2.7:/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Applications/Python 2.7
OLDPWD=/Applications
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
PYTHONPATH=:/Applications/Python 2.7
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  Python 2.7 ls
Extras                       Install Certificates.command Python Launcher.app
IDLE.app                     License.rtf                  ReadMe.rtf
Icon?                        Python Documentation.html    Update Shell Profile.command
➜  Python 2.7 python -c "import sys; print(sys.path)"
['', '/Applications/Python 2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages']
➜  Python 2.7 which python
/usr/local/bin/python
➜  Python 2.7 env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=:/Applications/Python 2.7:/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Applications/Python 2.7
OLDPWD=/Applications
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
PYTHONPATH=:/Applications/Python 2.7
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  Python 2.7 export PATH=$PYTHONPATH:/Users/samsongenet/Library/Python/3.9/bin:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbi/usr/local/bin/python
➜  Python 2.7 export PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  Python 2.7 l
total 784
drwxr-xr-x@ 11 root  wheel   352B May  8 16:54 .
drwxrwxr-x  58 root  admin   1.8K May  8 16:54 ..
drwxr-xr-x   5 root  wheel   160B Apr 20  2020 Extras
drwxr-xr-x   3 root  wheel    96B May  8 16:54 IDLE.app
-rw-r--r--@  1 root  wheel     0B Apr 20  2020 Icon?
-rwxr-xr-x   1 root  wheel   1.4K Apr 20  2020 Install Certificates.command
-rw-r--r--   1 root  wheel    13K Apr 20  2020 License.rtf
lrwxr-xr-x   1 root  wheel    98B May  8 16:54 Python Documentation.html -> /Library/Frameworks/Python.framework/Versions/2.7/Resources/English.lproj/Documentation/index.html
drwxr-xr-x   3 root  wheel    96B May  8 16:54 Python Launcher.app
-rw-r--r--   1 root  wheel   3.6K Apr 20  2020 ReadMe.rtf
-rwxr-xr-x   1 root  wheel   2.5K Apr 20  2020 Update Shell Profile.command
➜  Python 2.7 ls
Extras                       Install Certificates.command Python Launcher.app
IDLE.app                     License.rtf                  ReadMe.rtf
Icon?                        Python Documentation.html    Update Shell Profile.command
➜  Python 2.7 python
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> env
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'env' is not defined
>>> env
KeyboardInterrupt
>>> 
KeyboardInterrupt
>>> ^D
➜  Python 2.7 env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Applications/Python 2.7
OLDPWD=/Applications
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
PYTHONPATH=:/Applications/Python 2.7
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  Python 2.7 which python3
/usr/bin/python3
➜  Python 2.7 cd /usr/local/bin/python
cd: not a directory: /usr/local/bin/python
➜  Python 2.7 cd /usr/local/bin       
➜  bin ls
2to3                      exrinfo                   identify                  pango-list                smtpd.py
2to3-2                    exrmakepreview            idle                      pango-segmentation        smtpd2.7.py
2to3-2.7                  exrmaketiled              idle2                     pango-view                smtpd2.py
2to3-3.11                 exrmultipart              idle2.7                   patcheck                  sndfile-cmp
4channels                 exrmultiview              idle3.11                  pcre2-config              sndfile-concat
Magick++-config           exrstdattr                idn                       pcre2grep                 sndfile-convert
MagickCore-config         fax2ps                    idn2                      pcre2test                 sndfile-deinterleave
MagickWand-config         fax2tiff                  ifnames                   pdf2dsc                   sndfile-info
SvtAv1DecApp              fc-cache                  imagetops                 pdf2ps                    sndfile-interleave
SvtAv1EncApp              fc-cat                    img2webp                  pem2der                   sndfile-metadata-get
aead_demo                 fc-conflist               imgcmp                    pf2afm                    sndfile-metadata-set
ambiguous_words           fc-list                   imginfo                   pfbtopfa                  sndfile-play
animate                   fc-match                  import                    pip                       sndfile-salvage
aomdec                    fc-pattern                ismindex                  pip2                      speexdec
aomenc                    fc-query                  jasper                    pip2.7                    speexenc
asn1Coding                fc-scan                   jbig2dec                  pip3.11                   srptool
asn1Decoding              fc-validate               jiv                       pipenv                    srt-ffplay
asn1Parser                ffescape                  jpegtran                  pk_decrypt                srt-file-transmit
autoconf                  ffeval                    jpgicc                    pk_encrypt                srt-live-transmit
autoheader                ffhash                    jxlinfo                   pk_sign                   srt-tunnel
autom4te                  ffmpeg                    key_app                   pk_verify                 ssl_client1
autopoint                 ffplay                    key_app_writer            pkcs1-conv                ssl_client2
autoreconf                ffprobe                   key_ladder_demo           pkg-config                ssl_context_info
autoscan                  fileinfo                  key_ladder_demo.sh        pktdumper                 ssl_fork_server
autoupdate                flac                      lame                      plotframes                ssl_mail_client
aviocat                   fourcc2pixfmt             libav-merge-next-commit   png-fix-itxt              ssl_pthread_server
bd_info                   freetype-config           libpng-config             pngfix                    ssl_server
bd_list_titles            fribidi                   libpng16-config           postprocessing_benchmark  ssl_server2
bd_splice                 gdbus                     linkicc                   pphs                      stream
benchmark_xl              gdbus-codegen             load_roots                ppm2tiff                  strerror
bisect-create             gen-enc-table             loudnorm.rb               printafm                  target_dec_fate.sh
bjoentegaard              gen-rc                    lprsetup.sh               probetest                 tesseract
brew                      gen_entropy               lstmeval                  ps2ascii                  text2image
brotli                    gen_key                   lstmtraining              ps2epsi                   tiff2bw
cairo-sphinx              gen_random_ctr_drbg       lz4                       ps2pdf                    tiff2pdf
cairo-trace               generic_sum               lz4c                      ps2pdf12                  tiff2ps
cert_app                  gettext                   lz4cat                    ps2pdf13                  tiff2rgba
cert_req                  gettext.sh                lzcat                     ps2pdf14                  tiffcmp
cert_write                gettextize                lzcmp                     ps2pdfwr                  tiffcp
cipher_aead_demo          gif2rgb                   lzdiff                    ps2ps                     tiffcrop
cjpeg                     gif2webp                  lzegrep                   ps2ps2                    tiffdither
cjpeg_hdr                 gifbuild                  lzfgrep                   psa_constant_names        tiffdump
cjxl                      gifclrmp                  lzgrep                    psicc                     tiffinfo
cl2c                      giffix                    lzless                    psktool                   tiffmedian
classifier_tester         giftext                   lzma                      pydoc                     tiffset
clean-diff                giftool                   lzmadec                   pydoc2                    tiffsplit
cntraining                gio                       lzmainfo                  pydoc2.7                  tificc
combine_lang_model        gio-querymodules          lzmore                    pydoc3.11                 tjbench
combine_tessdata          glib-compile-resources    magick                    pyenv                     transicc
compare                   glib-compile-schemas      magick-script             pyenv-install             trasher
composite                 glib-genmarshal           make_chlayout_test        pyenv-uninstall           trust
conjure                   glib-gettextize           mbedtls-benchmark         python                    udp_proxy
convert                   glib-mkenums              mbedtls-selftest          python-build              uncoded_frame
convertfilestopdf         glibtool                  md_hmac_demo              python-config             unicharset_extractor
convertfilestops          glibtoolize               mem_image                 python2                   unix-lpr.sh
convertformat             gnutls-certtool           merge_unicharsets         python2-config            unlz4
convertsegfilestopdf      gnutls-cli                metaflac                  python2.7                 unlzma
convertsegfilestops       gnutls-cli-debug          mftraining                python2.7-config          unprocessed_raw
converttopdf              gnutls-serv               mini_client               python3.11                unwrap-diff
converttops               gobject-query             missing_codec_desc        python3.11-config         unxz
crl_app                   gpcl6                     mogrify                   pythonw                   unzstd
crypt_and_hash            gpcl6c                    montage                   pythonw2                  update-mime-database
crypto_bench              gpdlc                     mpg123                    pythonw2.7                venc_data_dump
crypto_examples           gr2fonttest               mpg123-id3dump            pzstd                     vmaf
curve_keygen              graph2dot                 mpg123-strip              qt-faststart              webpinfo
cwebp                     gresource                 msgattrib                 query_compile_time_config webpmux
cws2fws                   gs                        msgcat                    rav1e                     wget
danetool                  gsbj                      msgcmp                    raw-identify              wheel3.11
dav1d                     gsc                       msgcomm                   raw2tiff                  wordlist2dawg
dawg2wordlist             gsdj                      msgconv                   rawtextdump               wrjpgcom
dcraw_emu                 gsdj500                   msgen                     rd-curves                 x264
dcraw_half                gsettings                 msgexec                   rdjpgcom                  x265
dh_client                 gslj                      msgfilter                 recode-sr-latin           xgettext
dh_genprime               gslp                      msgfmt                    req_app                   xtractprotos
dh_server                 gsnd                      msggrep                   rist2rist                 xz
display                   gsx                       msginit                   ristreceiver              xzcat
djpeg                     gtester                   msgmerge                  ristsender                xzcmp
djxl                      gtester-report            msgunfmt                  ristsrppasswd             xzdec
dtls_client               guild                     msguniq                   rsa_decrypt               xzdiff
dtls_server               guile                     multirender_test          rsa_encrypt               xzegrep
dvd2concat                guile-config              murge                     rsa_genkey                xzfgrep
dvipdf                    guile-snarf               ncdu                      rsa_sign                  xzgrep
dwebp                     guile-tools               nettle-hash               rsa_sign_pss              xzless
easy_install              gxps                      nettle-lfib-stream        rsa_verify                xzmore
easy_install-2.7          gxpsc                     nettle-pbkdf2             rsa_verify_pss            yuv-distortion
ecdh_curve25519           half_mt                   ngettext                  rubberband                zeroize
ecdsa                     hb-ot-shape-closure       normalize.py              rubberband-r3             zmqsend
enc265                    hb-shape                  ocsptool                  scale_slice_test          zmqshell.py
enum_options              hb-subset                 opj_compress              sdl2-config               zstd
envsubst                  hb-view                   opj_decompress            seek_print                zstdcat
eps2eps                   heif-convert              opj_dump                  set_unicharset_properties zstdgrep
event_rpcgen.py           heif-enc                  out123                    sexp-conv                 zstdless
exr2aces                  heif-info                 p11-kit                   shapeclustering           zstdmt
exrenvmap                 heif-thumbnailer          p11tool                   sidxindex
exrheader                 hmac_demo                 pal2rgb                   simple_dcraw
➜  bin ls
2to3                      exrinfo                   identify                  pango-list                smtpd.py
2to3-2                    exrmakepreview            idle                      pango-segmentation        smtpd2.7.py
2to3-2.7                  exrmaketiled              idle2                     pango-view                smtpd2.py
2to3-3.11                 exrmultipart              idle2.7                   patcheck                  sndfile-cmp
4channels                 exrmultiview              idle3.11                  pcre2-config              sndfile-concat
Magick++-config           exrstdattr                idn                       pcre2grep                 sndfile-convert
MagickCore-config         fax2ps                    idn2                      pcre2test                 sndfile-deinterleave
MagickWand-config         fax2tiff                  ifnames                   pdf2dsc                   sndfile-info
SvtAv1DecApp              fc-cache                  imagetops                 pdf2ps                    sndfile-interleave
SvtAv1EncApp              fc-cat                    img2webp                  pem2der                   sndfile-metadata-get
aead_demo                 fc-conflist               imgcmp                    pf2afm                    sndfile-metadata-set
ambiguous_words           fc-list                   imginfo                   pfbtopfa                  sndfile-play
animate                   fc-match                  import                    pip                       sndfile-salvage
aomdec                    fc-pattern                ismindex                  pip2                      speexdec
aomenc                    fc-query                  jasper                    pip2.7                    speexenc
asn1Coding                fc-scan                   jbig2dec                  pip3.11                   srptool
asn1Decoding              fc-validate               jiv                       pipenv                    srt-ffplay
asn1Parser                ffescape                  jpegtran                  pk_decrypt                srt-file-transmit
autoconf                  ffeval                    jpgicc                    pk_encrypt                srt-live-transmit
autoheader                ffhash                    jxlinfo                   pk_sign                   srt-tunnel
autom4te                  ffmpeg                    key_app                   pk_verify                 ssl_client1
autopoint                 ffplay                    key_app_writer            pkcs1-conv                ssl_client2
autoreconf                ffprobe                   key_ladder_demo           pkg-config                ssl_context_info
autoscan                  fileinfo                  key_ladder_demo.sh        pktdumper                 ssl_fork_server
autoupdate                flac                      lame                      plotframes                ssl_mail_client
aviocat                   fourcc2pixfmt             libav-merge-next-commit   png-fix-itxt              ssl_pthread_server
bd_info                   freetype-config           libpng-config             pngfix                    ssl_server
bd_list_titles            fribidi                   libpng16-config           postprocessing_benchmark  ssl_server2
bd_splice                 gdbus                     linkicc                   pphs                      stream
benchmark_xl              gdbus-codegen             load_roots                ppm2tiff                  strerror
bisect-create             gen-enc-table             loudnorm.rb               printafm                  target_dec_fate.sh
bjoentegaard              gen-rc                    lprsetup.sh               probetest                 tesseract
brew                      gen_entropy               lstmeval                  ps2ascii                  text2image
brotli                    gen_key                   lstmtraining              ps2epsi                   tiff2bw
cairo-sphinx              gen_random_ctr_drbg       lz4                       ps2pdf                    tiff2pdf
cairo-trace               generic_sum               lz4c                      ps2pdf12                  tiff2ps
cert_app                  gettext                   lz4cat                    ps2pdf13                  tiff2rgba
cert_req                  gettext.sh                lzcat                     ps2pdf14                  tiffcmp
cert_write                gettextize                lzcmp                     ps2pdfwr                  tiffcp
cipher_aead_demo          gif2rgb                   lzdiff                    ps2ps                     tiffcrop
cjpeg                     gif2webp                  lzegrep                   ps2ps2                    tiffdither
cjpeg_hdr                 gifbuild                  lzfgrep                   psa_constant_names        tiffdump
cjxl                      gifclrmp                  lzgrep                    psicc                     tiffinfo
cl2c                      giffix                    lzless                    psktool                   tiffmedian
classifier_tester         giftext                   lzma                      pydoc                     tiffset
clean-diff                giftool                   lzmadec                   pydoc2                    tiffsplit
cntraining                gio                       lzmainfo                  pydoc2.7                  tificc
combine_lang_model        gio-querymodules          lzmore                    pydoc3.11                 tjbench
combine_tessdata          glib-compile-resources    magick                    pyenv                     transicc
compare                   glib-compile-schemas      magick-script             pyenv-install             trasher
composite                 glib-genmarshal           make_chlayout_test        pyenv-uninstall           trust
conjure                   glib-gettextize           mbedtls-benchmark         python                    udp_proxy
convert                   glib-mkenums              mbedtls-selftest          python-build              uncoded_frame
convertfilestopdf         glibtool                  md_hmac_demo              python-config             unicharset_extractor
convertfilestops          glibtoolize               mem_image                 python2                   unix-lpr.sh
convertformat             gnutls-certtool           merge_unicharsets         python2-config            unlz4
convertsegfilestopdf      gnutls-cli                metaflac                  python2.7                 unlzma
convertsegfilestops       gnutls-cli-debug          mftraining                python2.7-config          unprocessed_raw
converttopdf              gnutls-serv               mini_client               python3.11                unwrap-diff
converttops               gobject-query             missing_codec_desc        python3.11-config         unxz
crl_app                   gpcl6                     mogrify                   pythonw                   unzstd
crypt_and_hash            gpcl6c                    montage                   pythonw2                  update-mime-database
crypto_bench              gpdlc                     mpg123                    pythonw2.7                venc_data_dump
crypto_examples           gr2fonttest               mpg123-id3dump            pzstd                     vmaf
curve_keygen              graph2dot                 mpg123-strip              qt-faststart              webpinfo
cwebp                     gresource                 msgattrib                 query_compile_time_config webpmux
cws2fws                   gs                        msgcat                    rav1e                     wget
danetool                  gsbj                      msgcmp                    raw-identify              wheel3.11
dav1d                     gsc                       msgcomm                   raw2tiff                  wordlist2dawg
dawg2wordlist             gsdj                      msgconv                   rawtextdump               wrjpgcom
dcraw_emu                 gsdj500                   msgen                     rd-curves                 x264
dcraw_half                gsettings                 msgexec                   rdjpgcom                  x265
dh_client                 gslj                      msgfilter                 recode-sr-latin           xgettext
dh_genprime               gslp                      msgfmt                    req_app                   xtractprotos
dh_server                 gsnd                      msggrep                   rist2rist                 xz
display                   gsx                       msginit                   ristreceiver              xzcat
djpeg                     gtester                   msgmerge                  ristsender                xzcmp
djxl                      gtester-report            msgunfmt                  ristsrppasswd             xzdec
dtls_client               guild                     msguniq                   rsa_decrypt               xzdiff
dtls_server               guile                     multirender_test          rsa_encrypt               xzegrep
dvd2concat                guile-config              murge                     rsa_genkey                xzfgrep
dvipdf                    guile-snarf               ncdu                      rsa_sign                  xzgrep
dwebp                     guile-tools               nettle-hash               rsa_sign_pss              xzless
easy_install              gxps                      nettle-lfib-stream        rsa_verify                xzmore
easy_install-2.7          gxpsc                     nettle-pbkdf2             rsa_verify_pss            yuv-distortion
ecdh_curve25519           half_mt                   ngettext                  rubberband                zeroize
ecdsa                     hb-ot-shape-closure       normalize.py              rubberband-r3             zmqsend
enc265                    hb-shape                  ocsptool                  scale_slice_test          zmqshell.py
enum_options              hb-subset                 opj_compress              sdl2-config               zstd
envsubst                  hb-view                   opj_decompress            seek_print                zstdcat
eps2eps                   heif-convert              opj_dump                  set_unicharset_properties zstdgrep
event_rpcgen.py           heif-enc                  out123                    sexp-conv                 zstdless
exr2aces                  heif-info                 p11-kit                   shapeclustering           zstdmt
exrenvmap                 heif-thumbnailer          p11tool                   sidxindex
exrheader                 hmac_demo                 pal2rgb                   simple_dcraw
➜  bin cd.
zsh: command not found: cd.
➜  bin cd ..
➜  local ls
Caskroom   Cellar     Frameworks Homebrew   bin        etc        include    lib        opt        sbin       share      var
➜  local cd
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ which python
/usr/local/bin/python
➜  ~ la
total 848
-r--------     1 samsongenet  staff     7B Jan 23 14:24 .CFUserTextEncoding
-rw-r--r--@    1 samsongenet  staff    18K May  8 15:39 .DS_Store
drwx------  1215 samsongenet  staff    38K May  8 15:39 .Trash
drwxr-xr-x    12 samsongenet  staff   384B Apr 30 17:24 .arduinoIDE
drwxr-xr-x     3 samsongenet  staff    96B Feb  6 12:24 .cache
drwxr-xr-x     5 samsongenet  staff   160B Feb  2 11:52 .config
drwx------     3 samsongenet  staff    96B Dec 29  2020 .cups
-rw-r--r--     1 samsongenet  staff    59B Feb  1 12:33 .gitconfig
drwx------     6 samsongenet  staff   192B Jan 26  2022 .islonline
drwxr-xr-x     3 samsongenet  staff    96B Feb 28  2022 .jssc
-rw-------     1 samsongenet  staff    20B Mar 15 12:08 .lesshst
drwxr-xr-x     3 samsongenet  staff    96B May  4 10:30 .local
drwxr-xr-x    23 samsongenet  staff   736B May  8 09:13 .oh-my-zsh
drwxr-xr-x     4 samsongenet  staff   128B Feb 27  2022 .oracle_jre_usage
drwxr-xr-x     9 samsongenet  staff   288B Feb 20 12:45 .platformio
drwx------     7 samsongenet  staff   224B Jan 26 11:38 .ssh
drwxr-xr-x     4 samsongenet  staff   128B Oct 16  2022 .thumbnails
-rw-------     1 samsongenet  staff   9.3K May  8 16:33 .viminfo
drwxr-xr-x     4 samsongenet  staff   128B Jan 26 11:05 .vscode
-rw-r--r--     1 samsongenet  staff   180B Jan 26 14:56 .wget-hsts
-rw-r--r--     1 samsongenet  staff    47K May  8 09:13 .zcompdump-MacBook Pro van Samson-5.8.1
-r--r--r--     1 samsongenet  staff   111K May  8 09:13 .zcompdump-MacBook Pro van Samson-5.8.1.zwc
-rw-r--r--     1 samsongenet  staff    47K Jan 26 15:15 .zcompdump-MacBook-Pro-van-Samson-5.8.1.MacBook-Pro-van-Samson.local.37823
-rw-r--r--     1 samsongenet  staff   164B May  8 16:54 .zprofile
-rw-------     1 samsongenet  staff    73K May  8 17:17 .zsh_history
drwx------    22 samsongenet  staff   704B May  8 15:30 .zsh_sessions
-rw-r--r--     1 samsongenet  staff   3.8K Jan 26 15:16 .zshrc
drwx------@    6 samsongenet  staff   192B Apr 21 14:05 Applications
-rw-r--r--     1 samsongenet  staff   282B Mar 22 09:36 Controller.txt
drwx------@   30 samsongenet  staff   960B May  8 12:02 Desktop
drwx------@   55 samsongenet  staff   1.7K May  5 13:28 Documents
drwx------@ 1250 samsongenet  staff    39K May  8 16:53 Downloads
drwxr-x---     3 samsongenet  staff    96B Apr 16 17:51 Fusion 360 CAM
drwx------@   26 samsongenet  staff   832B Mar 20 14:48 Google Drive
drwx------@   92 samsongenet  staff   2.9K May  8 15:39 Library
drwx------+    4 samsongenet  staff   128B Oct  9  2020 Movies
drwx------+    4 samsongenet  staff   128B Oct 16  2020 Music
drwx------+    6 samsongenet  staff   192B Nov 18  2020 Pictures
drwxr-xr-x+    4 samsongenet  staff   128B Oct  8  2020 Public
drwxr-xr-x     4 samsongenet  staff   128B Apr 12 14:47 bin
drwxr-xr-x     6 samsongenet  staff   192B Apr 25 14:44 fabacademy
-rw-r--r--     1 samsongenet  staff   414B Mar 22 11:40 gaatjes.txt
-rw-r--r--     1 samsongenet  staff   414B May  4 10:30 index.html
-rw-r--r--     1 samsongenet  staff   190B May  4 10:37 jsconfig.json
drwxr-xr-x     4 samsongenet  staff   128B May  4 10:30 libraries
-rw-r--r--     1 samsongenet  staff    87B May  4 10:30 sketch.js
-rw-r--r--     1 samsongenet  staff    72B May  4 10:30 style.css
drwxr-xr-x     3 samsongenet  staff    96B Feb  2 18:09 test
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ cd Applications 
➜  Applications ls
Autodesk Fusion 360 Service Utility.app Autodesk Fusion 360.app                 Remove Autodesk Fusion 360.app
➜  Applications env
__CFBundleIdentifier=com.apple.Terminal
TMPDIR=/var/folders/15/7v80z2n17nlcyqc4ljlx6clm0000gn/T/
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UM9VQm37cD/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=445
TERM_SESSION_ID=5F71A9DF-8138-48CC-B8DE-71192AC5D279
SHELL=/bin/zsh
HOME=/Users/samsongenet
LOGNAME=samsongenet
USER=samsongenet
PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/samsongenet/Applications
OLDPWD=/Users/samsongenet
ZSH=/Users/samsongenet/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
PYTHONPATH=:/Applications/Python 2.7
LC_CTYPE=UTF-8
_=/usr/bin/env
➜  Applications cd ..
➜  ~ ls
Applications   Documents      Google Drive   Music          bin            index.html     sketch.js
Controller.txt Downloads      Library        Pictures       fabacademy     jsconfig.json  style.css
Desktop        Fusion 360 CAM Movies         Public         gaatjes.txt    libraries      test
➜  ~ cd ../..
➜  / ls
Applications System       Volumes      cores        etc          opt          sbin         usr
Library      Users        bin          dev          home         private      tmp          var
➜  / cd Applications 
➜  /Applications ls
Adobe Illustrator CC 2019                               Keynote.app
Adobe InDesign CC 2019                                  KiCad
Adobe Photoshop CC 2019                                 LightBurn.app
Adobe Photoshop CC 2019 v20.0.4 Pre-Patched [TNT]       NordVPN IKE.app
Adobe Photoshop CC 2019 v20.0.4 Pre-Patched [TNT] alias Numbers.app
Arduino.app                                             Original Prusa Drivers
Audacity.app                                            Pages.app
Autodesk Fusion 360 Installer                           Python 2.7
Backup and Sync.app                                     Safari.app
Blender                                                 SketchUp 2020
Blender.app                                             SlicerForFusion360.app
CH34xVCPDriver.app                                      Spaze .sketch
Epic Games Launcher.app                                 Spotify.app
Fritzing                                                Stremio.app
Fritzing.app                                            The Unarchiver.app
GarageBand.app                                          Transmission
Google Chrome.app                                       Ultimaker Cura.app
Google Docs.app                                         Utilities
Google Drive.app                                        VLC media player
Google Earth Pro.app                                    VLC.app
Google Sheets.app                                       Wacom Tablet.localized
Google Slides.app                                       WhatsApp 2.app
HP Easy Scan.app                                        WhatsApp.app
Inkscape                                                audacity-macos-3.1.3-Intel
Inkscape alias                                          iMovie.app
Inkscape.app                                            micropython-1.20.0
Install Google Earth Pro 7.3.3.7786.pkg                 zoom.us.app
➜  /Applications cd Arduino.app 
➜  Arduino.app l
total 0
drwxr-xr-x@  3 samsongenet  staff    96B Dec 20  2021 .
drwxrwxr-x  58 root         admin   1.8K May  8 16:54 ..
drwxr-xr-x@ 10 samsongenet  staff   320B Dec 20  2021 Contents
➜  Arduino.app ls 
Contents
➜  Arduino.app -a          
zsh: command not found: -a
➜  Arduino.app -a arduino.app
zsh: command not found: -a
➜  Arduino.app - a arduino.app
cd: too many arguments
➜  Arduino.app open  arduino.app
The file /Applications/Arduino.app/arduino.app does not exist.
➜  Arduino.app cd Contents 
➜  Contents ls
CodeResources  Info.plist     Java           MacOS          PkgInfo        PlugIns        Resources      _CodeSignature
➜  Contents cd MacOS 
➜  MacOS ls
Arduino
➜  MacOS open Arduino 
➜  MacOS cd
➜  ~ cd
➜  ~ CD ../..                          
➜  ~ cd ../..
➜  / Applications/Arduino.app 
➜  Arduino.app open -a 
open: option requires an argument -- a
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-s <partial SDK name>][-b <bundle identifier>] [-a <application>] [-u URL] [filenames] [--args arguments]
Help: Open opens files from a shell.
      By default, opens each file using the default application for that file.  
      If the file is in the form of a URL, the file will be opened as a URL.
Options: 
      -a                    Opens with the specified application.
      -b                    Opens with the specified application bundle identifier.
      -e                    Opens with TextEdit.
      -t                    Opens with default text editor.
      -f                    Reads input from standard input and opens with TextEdit.
      -F  --fresh           Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
      -R, --reveal          Selects in the Finder instead of opening.
      -W, --wait-apps       Blocks until the used applications are closed (even if they were already running).
          --args            All remaining arguments are passed in argv to the application's main() function instead of opened.
      -n, --new             Open a new instance of the application even if one is already running.
      -j, --hide            Launches the app hidden.
      -g, --background      Does not bring the application to the foreground.
      -h, --header          Searches header file locations for headers matching the given filenames, and opens them.
      -s                    For -h, the SDK to use; if supplied, only SDKs whose names contain the argument value are searched.
                            Otherwise the highest versioned SDK in each platform is used.
      -u, --url URL         Open this URL, even if it matches exactly a filepath
      -i, --stdin  PATH     Launches the application with stdin connected to PATH; defaults to /dev/null
      -o, --stdout PATH     Launches the application with /dev/stdout connected to PATH; 
          --stderr PATH     Launches the application with /dev/stderr connected to PATH to
          --env    VAR      Add an enviroment variable to the launched process, where VAR is formatted AAA=foo or just AAA for a null string value.
➜  Arduino.app open -a Arduino    
➜  Arduino.app export PATH=/usr/local/bin/python:/Users/samsongenet/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Last update: May 17, 2023