VS code install OK. Python on mac using the terminal command as written in the guide on page 25 resulted in errors as posted below. I have installed ver 3.11 from https://www.python.org/downloads/macos/
but it contains a few warnings about the M1 silicon and also some certificates it needs.
$ brew install python3
zsh: command not found: $
lastmac@Jims-Mac-Studio ~ % $ /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
zsh: command not found: $
lastmac@Jims-Mac-Studio ~ % $ /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
zsh: command not found: $
lastmac@Jims-Mac-Studio ~ % sudo $ /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
Password:
sudo: $: command not found
lastmac@Jims-Mac-Studio ~ % sudo $ /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
sudo: $: command not found
lastmac@Jims-Mac-Studio ~ % sudo $ /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
sudo: $: command not found
lastmac@Jims-Mac-Studio ~ % python –version
zsh: command not found: python
—————— Will update later as I try to progress through Module 1 ——————–
Update. I just noticed on: https://code.visualstudio.com/docs/?dv=osx. that there is a number of TOP EXTENSIONS
of which Python is one. Is there a reason NOT to use it instead of your recommendation????
Jim
Hi.
I think maybe the command was broken during copy-paste.
Can you try to copy it from here:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then, run the following:
brew install python3
Let me know if this works.
Regards,
Sara
Your first command certainly produced a lot of text within terminal and initially appeared to work.
the second command “brew install python3” did not progress. On closer inspection, there seems to be a problem with a PATH allocation. It seems that I have to follow some instructions to fix things. I will try to get to this at some stage but I currently have a grand-daughter for 2 days and she is very demanding of my attention.
Below is the last portion of the text in the terminal.
In a more positive note, I managed to download the blink sketch to my ESP32 DEVKIT V1 – DOIT but it wont blink the onboard LED. Maybe LED 2 is not the correct one for this case? I have a second DEVKIt I can try to see if it fails as well. (When I find time). Regards, Jim
Thank you for your assistance.
* [new tag] 4.1.3 -> 4.1.3
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 13 (delta 5), reused 11 (delta 5), pack-reused 0
Unpacking objects: 100% (13/13), 7.49 KiB | 511.00 KiB/s, done.
From https://github.com/Homebrew/brew
* [new tag] 4.0.29 -> 4.0.29
HEAD is now at 5669df908 Merge pull request #15798 from Homebrew/sponsors-maintainers-man-completions
Warning: /opt/homebrew/bin is not in your PATH.
Instructions on how to configure your shell for Homebrew
can be found in the ‘Next steps’ section below.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
– Run these two commands in your terminal to add Homebrew to your PATH:
(echo; echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”‘) >> /Users/lastmac/.zprofile
eval “$(/opt/homebrew/bin/brew shellenv)”
– Run brew help to get started
– Further documentation:
https://docs.brew.sh
lastmac@Jims-Mac-Studio ~ %
lastmac@Jims-Mac-Studio ~ % brew install python3
zsh: command not found: brew
Hi.
Yes, the installation of brew was successful.
But, you need to fix the command path. You need to run the following commands in this order:
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
brew doctor
brew install python3
Let me know if this fixes the issue.
Regards,
Sara
Sorry. No. see below . 2 attempts to ensure copy paste OK.
Last login: Wed Aug 2 14:53:59 on console
lastmac@Jims-Mac-Studio ~ % echo “export PATH=/opt/homebrew/bin:$PATH” >> ~/.zshrc
lastmac@Jims-Mac-Studio ~ % brew doctor
zsh: command not found: brew
lastmac@Jims-Mac-Studio ~ % echo “export PATH=/opt/homebrew/bin:$PATH” >> ~/.zshrc
lastmac@Jims-Mac-Studio ~ % brew doctor
zsh: command not found: brew
lastmac@Jims-Mac-Studio ~ % sudo brew doctor
Password:
sudo: brew: command not found
lastmac@Jims-Mac-Studio ~ %
HEY SARA .. I did a spotlight search on Macintosh HD and found that Brew is actually there!
Path is Macintosh HD>OPT>homebrew>bin>brew. as shown in the status bar of “Finder”
Hi.
It seems there is some issue with your brew installation.
Let’s try to fix it using the following commands.
1) Unninstall:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
2) Then, install again:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3) Now, add bre to the Path variable:
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.zshrc
4) Try to install python again:
brew install python3
Let me know if this works.
Regards,
Sara
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R lastmac:admin /opt/homebrew
==> Downloading and installing Homebrew…
HEAD is now at d2863d05b Merge pull request #15740 from EricFromCanada/tap-suggestion
Warning: /opt/homebrew/bin is not in your PATH.
Instructions on how to configure your shell for Homebrew
can be found in the ‘Next steps’ section below.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
– Run these two commands in your terminal to add Homebrew to your PATH:
(echo; echo ‘eval “$(/opt/homebrew/bin/brew shellenv)”‘) >> /Users/lastmac/.zprofile
eval “$(/opt/homebrew/bin/brew shellenv)”
– Run brew help to get started
– Further documentation:
https://docs.brew.sh
lastmac@Jims-Mac-Studio ~ % echo ‘export PATH=”/usr/local/bin:$PATH”‘ >> ~/.bash_profile
lastmac@Jims-Mac-Studio ~ % echo ‘export PATH=”/usr/local/bin:$PATH”‘ >> $HOME/.zshrc
lastmac@Jims-Mac-Studio ~ % brew install python3
zsh: command not found: brew
lastmac@Jims-Mac-Studio ~ %
Hi.
There seems to be an issue with the MAC OS version (https://github.com/orgs/Homebrew/discussions/446)
Can you try the following two commands:
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install python3
Tell me what you get.
Regards,
Sara
Appears to be successful and below is a paste of the last section from the terminal window.
However, I have a new problem regarding my Blink code download to my ESP32. It appears to upload ok but it doesn’t RUN the code. I Shutdown V studio code and opened Arduino IDE, selected the board (DEVKIT V1 -DOIT 36 pins) and uploaded and successfully saw the blue LED blink. (also blinked an Ext. LED on GPIO 2) I S/D IDE, re-launched V studio code & Downloaded. The blinking stopped and the Terminal window seemed to indicate a success. So I know it’s not the ESP32 module itself. (Same USB port designation checked!). Just doesn’t seem to run. (Tried boot PB and EN PB to no affect). Noted that the Arduino IDE upload didn’t require me to press the boot PB)
——————————————————————————————————————————–
For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺 /opt/homebrew/Cellar/python@3.11/3.11.4_1: 3,287 files, 62.6MB
==> Running `brew cleanup python@3.11`…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> python@3.11
Python has been installed as
/opt/homebrew/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/opt/homebrew/opt/python@3.11/libexec/bin
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/opt/homebrew/lib/python3.11/site-packages
tkinter is no longer included with this formula, but it is available separately:
brew install python-tk@3.11
gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
brew install python-gdbm@3.11
`dbm.ndbm` changed database backends in Homebrew Python 3.11.
If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
you’ll need to read your database using the older version of Homebrew Python and convert to another format.
`dbm` still defaults to `dbm.gnu` when it is installed.
For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
lastmac@Jims-Mac-Studio ~ %
Hi.
Do you get any errors on the Serial Monitor?
How does your platformio.ini file look like?
Are you sure you uploaded the code? There are the option to compile and the option to upload. Are you sure you clicked on the upload button?
Regards,
Sara
Terminal output suggested all ok. Definitely did an upload which explains why previous Arduino blinking led went out. Simply didn’t run on ESP. Spent another hour installing software on Win 11 V.M. WAS looking good until I was getting requests to access folders on my Mac OS. Wasn’t thinking straight but now realise that I should have isolated the VM from the MacOS.
The good news is that I have a working install on my Windows 10 Dell Laptop and now a successful upload and blinking LED. I believe I haven’t done the MacOS install in correct order and so Platform IO extension done before the python install. Maybe I’ll start again from scratch I am thinking that perhaps I should stick with Windows but preferably Windows 11 on an isolated VM. (I also remembered that I have a Ubuntu VM on the Mac Studio. ) So now I have too many choices. At least with Windows OS I can open device manager and see comm port designations.
11 pm here time to sleep. Send me your thoughts on the above. Thanks for your help. Jim.
Hi.
To be honest, I don’t know why you’re getting the issue with the blinking project on MAC OS, but I don’t think it’s related to the order you installed the software.
You can try to start from scratch just to make sure and try it out once again…
Let me know your results.
Regards,
Sara
Hi Sara. Have abandoned the MacOS and managed to get things going OK on the Windows11 “Parallels” Virtual Machine. I isolated the VM from the Mac to begin with. This caused 2 problems. The network connection was preventing VCS to get extensions. It had to do with DNS settings etc. Somehow I got it working. Then I couldn’t upload the blink Led and after looking at DEVICE MANAGER determined it needed The CP2102 USB to UART Bridge driver installed. I removed the isolation from the Mac but haven’t uninstalled VCStudio as yet. So I have 2 working installations – The windows 10 Dell Laptop and the Windows11 VM. This will aid in fault-finding in the future plus provide portability to projects. For any future calls for help, shall I start a different help session?
Regards, Jim