Open jcrossley3 opened 4 years ago
what i had done:
@loboris PLEASE COMMIT THIS FILE CONVERTED FOR NEXT RELEASE
An easy workaround: in the folder where you cloned the repo set up a virtual environment with python2. To do so, find where your python2 is: which python2
, on my machine (Kubuntu 20.04) it was /usr/bin/python2
.
Create a virtual environment with
virtualenv -p /usr/bin/python2 venv
then activate it with
source venv/bin/activate
Now if you just type python
you'll see that it's 2.7.x and not 3.x.x. And ./build.sh works like a charm :)
virtualenv is good alternative, should be mentioned in readme.md
I just opened a PR with this explanatory note added at the end, and also another fix for flashing problems.
... or even better,... should open a PR with the updated gen_appbin.py
file for python3
On way I got this working is install python 2 and switch to python 2 Each number is command typed (copied) to terminal
sudo apt install python2
python2 -V Python 2.7.18
ls /usr/bin/python* /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.10
sudo update-alternatives --list python update-alternatives: error: no alternatives for python
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1 update-alternatives: using /usr/bin/python2 to provide /usr/bin/python (python) in auto mode
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in auto mode
sudo update-alternatives --config python There are 2 choices for the alternative python (providing /usr/bin/python).
Press
python --version
Python 2.7.18
carl@DESKTOP-9JE80P5:~/ESP8266_AT_LoBo/at_lobo$ ./build.sh
Building firmware for 1MB Flash (ESP8285, DOUT spi mode) File size = 435332 esp8285_AT_1_2.bin OK esp8285_AT_2_2.bin OK
Building firmware for 512KB Flash, Flash map: 2 (512 no OTA) File size = 423140 esp8266_AT_1_0.bin OK
Building firmware for 1MB Flash, Flash map: 2 (512+512) File size = 435332 esp8266_AT_1_2.bin OK esp8266_AT_2_2.bin OK
Building firmware for 2MB Flash, Flash map: 3 (512+512) File size = 435396 esp8266_AT_1_3.bin OK esp8266_AT_2_3.bin OK
Building firmware for 4MB Flash, Flash map: 4 (512+512) File size = 435396 esp8266_AT_1_4.bin OK esp8266_AT_2_4.bin OK
Building firmware for 2MB Flash, Flash map: 5 (1024+1024) File size = 435396 esp8266_AT_1_5.bin OK
Building firmware for 4MB Flash, Flash map: 6 (1024+1024) File size = 435396 esp8266_AT_1_6.bin OK
=====================================
https://www.fosslinux.com/39384/switching-between-python-2-and-3-versions-on-ubuntu-20-04.htm
I'm on Fedora 31, which has sort of "retired" python 2 in favor of 3. I had to make the following changes in order for
./build.sh
to get past some "missing parentheses" errors:If acceptable, I'm happy to submit a PR. Other than that tiny issue, everything else worked like a charm, thanks!