Downloading and installing the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Leo lee
#81581 I’m using LoLIN NodeMCU V3, ESP8266 12E, and Arduino IDE 1.8.9. When i uploading program, the Error occurred:
python /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/tools/upload.py --chip esp8266 --port /dev/cu.wchusbserial1a1230 --baud 115200 --trace version --end --chip esp8266 --port /dev/cu.wchusbserial1a1230 --baud 115200 --trace write_flash 0x0 /var/folders/hf/1pgb0bfj1bjblvw7035mlllc0000gn/T/arduino_build_14437/sketch_apr05a.ino.bin --end
Error in command line, need pyserial path as 1st arg and esptool path as 2nd.

And I kown this error occured in file upload.py, because import esptool failed.
sys.argv.pop(0) # Remove executable name
toolspath = os.path.dirname(os.path.realpath(__file__)).replace('\\', '/') # CWD in UNIX format
try:
sys.path.append(toolspath + "/pyserial") # Add pyserial dir to search path
sys.path.append(toolspath + "/esptool") # Add esptool dir to search path
# sys.path.insert(0, toolspath + "/pyserial") # Add pyserial dir to search path
# sys.path.insert(0, toolspath + "/esptool") # Add esptool dir to search path
import esptool # If this fails, we can't continue and will bomb below
except:
sys.stderr.write("Error in command line, need pyserial path as 1st arg and esptool path as 2nd.\n")
sys.exit(1)

I run get.py in esp8266>tools, and there is not have the esptool and pyserial download path in file package_esp8266com_index.template.json.
Please tell me what should i do to fix this problem.