MacOS: Trouble setting up dev environment #23758
Replies: 5 comments 7 replies
-
Close VSC. Delete anything in folder |
Beta Was this translation helpful? Give feedback.
-
The installer downloads tar packages compressed with lzma. If the preinstalled Apple Python is used there is no support for. Install brew and install Python via brew. If this is done install the xz (=lzma) support package for tar. Make sure the idf var The needed python env seems correctly installed since in the logs the folder |
Beta Was this translation helpful? Give feedback.
-
The problem is the not working installer (idf_tools.py) all errors you encounter are caused from that |
Beta Was this translation helpful? Give feedback.
-
macOS Certificate Issues in Python Downloads - Analysis and SolutionsCommon Causes of Certificate Problems on macOS:1. Outdated Python Certificates
2. macOS System Python (/usr/bin/python3) Issues
3. macOS Keychain Problems
4. Python.org Certificates Not Installed
5. Corporate/Proxy Environment
Standard macOS Python (/usr/bin/python3) Solutions:# 1. Export system certificates
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain > /tmp/system_certs.pem
# 2. Set environment variable
export SSL_CERT_FILE=/tmp/system_certs.pem
# 3. Update Python certifi for system Python
/usr/bin/python3 -m pip install --user --upgrade certifi
# 4. Update the system
# System Settings → General → Software Update
# 5. Test connection
curl -v https://dl.espressif.com Homebrew Python Solutions:# Install Homebrew CA certificates
brew install ca-certificates
# Install OpenSSL
brew install openssl
# Update Python certifi via Homebrew
brew reinstall python-certifi
# Test Homebrew Python
/opt/homebrew/bin/python3 -c "import ssl; print(ssl.get_default_verify_paths())" Python.org Installation Solutions:# Run Install Certificates Command (if available)
/Applications/Python\ 3.11/Install\ Certificates.command
# or
/Applications/Python\ 3.12/Install\ Certificates.command
# Manually update certifi
python3 -m pip install --upgrade certifi Debugging Commands for macOS:# Display Python SSL information
python3 -c "import ssl, certifi; print('SSL:', ssl.OPENSSL_VERSION); print('Certifi:', certifi.where())"
# Update certificates
python3 -m pip install --upgrade certifi
# Install Python.app certificates (if available)
/Applications/Python\ 3.*/Install\ Certificates.command
# Homebrew CA certificates
brew install ca-certificates
# Test HTTPS connection
python3 -c "import urllib.request; urllib.request.urlopen('https://dl.espressif.com')" Additional Solution Approaches:Set Environment Variables:export SSL_CERT_FILE=$(python3 -m certifi)
export REQUESTS_CA_BUNDLE=$(python3 -m certifi) Bypass Corporate Proxy:export https_proxy=""
export HTTPS_PROXY="" Manually Download Certificates:# Manually add DigiCert Root CA
curl -O https://cacerts.digicert.com/DigiCertGlobalRootG2.crt Reset Certificate Cache:# Clear pip and certificate caches
sudo rm -rf /tmp/pip-* && rm -rf ~/.cache/pip Python Installation Type Detection:Different Python installations on macOS require different approaches: System Python (/usr/bin/python3):
Homebrew Python (/opt/homebrew or /usr/local):
Python.org Installation (/Applications/Python):
Testing Your Solution:# Test 1: Basic SSL connection
python3 -c "import ssl; ssl.create_default_context().check_hostname = True"
# Test 2: Download test
python3 -c "import urllib.request; print('Success:', urllib.request.urlopen('https://dl.espressif.com').status)"
# Test 3: Certificate path verification
python3 -c "import certifi; print('Certifi path:', certifi.where())"
# Test 4: System certificate access
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain | head -20 |
Beta Was this translation helpful? Give feedback.
-
No really not needed. I do all development on a Macbook Air M1. You can try
I have added a option in the installer to fall back to not verified https when the cert secured attempt failed. @geri-m If the above installer still fails try with a simple example project this one:
i have rewritten the download routine to use the Python lib EDIT: If one of the two versions solves the installer problems, i will do a Tasmota Platform release with the change. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to compile Tasmota locally (Macbook Air, Apple Silicon, M2), but I have trouble getting the setup run. What I tried:
(1) Stand Alone PlatformIO Installation
(2) GitPod Setup
platformio
to compile code.I was under the assumption that GitPod would manage the required tools in the container itself, therefore I did not investiage further how to add tools.
If there is any further information I can help with to get this resolved, let me know.
Beta Was this translation helpful? Give feedback.
All reactions