Python 3 on MacOS


Python 3 on MacOS

I recently had the need to create a small python script to run a process.  I quickly looked up a process I could utilize to read a Rest API then do some work based on that content.

I fired up Visual Studio code and wrote out the framework of the program I needed in about 10 min.  (NOTE: I have not used Python in a long time and it was fun to quickly put something together).

Once I was done writing the code I jumped into a term terminal and ran the program “python”.  It worked well – opened a file of records added to an array and displayed the line items and did a count.

I then added some code that referenced how to call an API and it used the “requests”, knowing I needed to run “pip install requests” before I ran the program, I was rewarded with an error.

 zsh: command not found: pip

Read more