2

I am having major difficulty in installing MicroPython onto an ESP3 using my RPi3B+ (may ask about this elsewhere) but for now I am trying to achieve this on a new fresh install/distro of Raspbian.

However, despite installing the esptool.py command correctly as per instructions, I get this error in the terminal when attempting to run it...

bash: esptool.py: command not found

To clarify a bit: I have a RPi3B+ with an existing distro where the esptool command works fine, and another distro which I created today using a separate SD card, where attempting to use the esptool yields the above error. So, on same RPi3B+ with distro 1: esptool works fine, with distro 2: esptool does not.

What I don't understand is that I am able to run this on my existing Raspbian Stretch distro without this error.

Any help greatly appreciated. Thanks

12
  • How did you install esptool.py?
    – CoderMike
    Commented Feb 12, 2019 at 23:43
  • Hey Mike... I did this by following the instructions on the git page, using pip install esptool and also pip3 install esptool
    – John
    Commented Feb 12, 2019 at 23:46
  • Sorry, it just occurred to me you may have wanted additional info. I installed from the terminal window that was opened after a reboot. I haven't changed passwords or directories on my new Raspbian distro, so installed in terminal pi@raspberrypi: Hope this helps.
    – John
    Commented Feb 12, 2019 at 23:51
  • 1
    @Ingo - absolutely, thanks for the prompt. Is this done by clicking the tick next to the answer? Sorry... new to this process.
    – John
    Commented Feb 14, 2019 at 12:25
  • 1
    Correct: the answer has now a green check mark, means the answer fixed your problem. Also in overviews of questions you find marks with the green background.
    – Ingo
    Commented Feb 15, 2019 at 13:45

1 Answer 1

6

On your original working install you probably installed it with sudo. If you use

sudo pip3 install esptool

esptool.py works just calling it by name, but if you don't use sudo you have to specify the whole path and either set esptool.py as executable, run it with python 3 [path to esptool.py], or similar.

pip3 show esptool

will show you the path.

If you install with sudo, the path it installs to is

/usr/local/lib/python3.5/dist-packages

If you install without sudo, the path it installs to is

/home/pi/.local/lib/python3.5/site-packages

Also, have a look at these tutorials for micropython on the esp32 https://www.rototron.info/raspberry-pi-esp32-micropython-tutorial/ and pay attention to the changed memory address 0x1000 when writing the firmware. It was 0x0000 before.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.