install.sh failed, ubuntu 16.04

xenpac
Posts: 25
Joined: Sun Dec 08, 2019 1:20 am

install.sh failed, ubuntu 16.04

Postby xenpac » Wed Apr 21, 2021 10:10 am

hi,
just cloned the latest IDF and ./install.sh failed.
(there was a previous older IDF version that i deleted.)
see log:


tom@LinuxLaptop:~/esp/esp-idf$ git describe
v4.4-dev-960-gcf457d4
tom@LinuxLaptop:~/esp/esp-idf$ ./install.sh
Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.5.2
"python3" has been detected
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2020r3-8.4.0 (already installed)
Skipping riscv32-esp-elf@1.24.0.123_64eb9ff-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20200709 (already installed)
Installing Python environment and packages
Creating a new Python environment in /home/tom/.espressif/python_env/idf4.4_py3.5_env
Traceback (most recent call last):
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1685, in <module>
main(sys.argv[1:])
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1681, in main
action_func(args)
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1383, in action_install_python_env
import virtualenv # noqa: F401
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/__init__.py", line 3, in <module>
from .run import cli_run, session_via_cli
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/run/__init__.py", line 13, in <module>
from .plugin.activators import ActivationSelector
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/run/plugin/activators.py", line 6, in <module>
from .base import ComponentBuilder
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/run/plugin/base.py", line 9, in <module>
from importlib_metadata import entry_points
File "/home/tom/.local/lib/python3.5/site-packages/importlib_metadata/__init__.py", line 158
dist: Optional['Distribution'] = None
^
SyntaxError: invalid syntax
tom@LinuxLaptop:~/esp/esp-idf$

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: install.sh failed, ubuntu 16.04

Postby ESP_Roland » Wed Apr 21, 2021 10:50 am

I think the invalid syntax is because pip is broken and installs an incompatible virtualenv. Please try this to resolve:
https://docs.espressif.com/projects/esp ... untu-16-04

xenpac
Posts: 25
Joined: Sun Dec 08, 2019 1:20 am

Re: install.sh failed, ubuntu 16.04

Postby xenpac » Wed Apr 21, 2021 3:50 pm

ok, followed the instruction.


got:

tom@LinuxLaptop:~/esp/esp-idf$ ./install.sh
Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.5.2
"python3" has been detected
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2020r3-8.4.0 (already installed)
Skipping riscv32-esp-elf@1.24.0.123_64eb9ff-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20200709 (already installed)
Installing Python environment and packages
Creating a new Python environment in /home/tom/.espressif/python_env/idf4.4_py3.5_env
Installing virtualenv
Collecting virtualenv
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting filelock<4,>=3.0.0 (from virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting six<2,>=1.9.0 (from virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting importlib-resources>=1.0; python_version < "3.7" (from virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting distlib<1,>=0.3.1 (from virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting appdirs<2,>=1.4.3 (from virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting importlib-metadata>=0.12; python_version < "3.8" (from virtualenv)
Downloading https://files.pythonhosted.org/packages ... ne-any.whl
Collecting zipp>=0.4; python_version < "3.8" (from importlib-resources>=1.0; python_version < "3.7"->virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting typing-extensions>=3.6.4; python_version < "3.8" (from importlib-metadata>=0.12; python_version < "3.8"->virtualenv)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Installing collected packages: filelock, six, zipp, importlib-resources, distlib, appdirs, typing-extensions, importlib-metadata, virtualenv
Successfully installed appdirs distlib filelock importlib-metadata importlib-resources six-1.10.0 typing-extensions virtualenv zipp
You are using pip version 8.1.1, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/__init__.py", line 3, in <module>
from .run import cli_run, session_via_cli
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/run/__init__.py", line 13, in <module>
from .plugin.activators import ActivationSelector
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/run/plugin/activators.py", line 6, in <module>
from .base import ComponentBuilder
File "/home/tom/.local/lib/python3.5/site-packages/virtualenv/run/plugin/base.py", line 9, in <module>
from importlib_metadata import entry_points
File "/home/tom/.local/lib/python3.5/site-packages/importlib_metadata/__init__.py", line 158
dist: Optional['Distribution'] = None
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1685, in <module>
main(sys.argv[1:])
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1681, in main
action_func(args)
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1390, in action_install_python_env
stdout=sys.stdout, stderr=sys.stderr)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'virtualenv', '/home/tom/.espressif/python_env/idf4.4_py3.5_env']' returned non-zero exit status 1
tom@LinuxLaptop:~/es

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: install.sh failed, ubuntu 16.04

Postby ESP_Roland » Wed Apr 21, 2021 4:10 pm

I don't think it was successful because:
"You are using pip version 8.1.1, however version 21.0.1 is available."

The wrong package is installed because of such an old version of pip is used.

pip needs to be removed entirely and installed manually with "python3 get-pip.py". pip upgrade of pip doesn't work on Ubuntu 16.04. Still the old pip will be used until it is properly removed.

xenpac
Posts: 25
Joined: Sun Dec 08, 2019 1:20 am

Re: install.sh failed, ubuntu 16.04

Postby xenpac » Thu Apr 22, 2021 9:39 am

ok, what a drama..

python -m pip uninstall pip
sudo apt remove pip
sudo apt remove python-pip
sudo apt autoremove
curl "https://bootstrap.pypa.io/pip/3.5/get-pip.py" -o "get-pip.py"
python3 get-pip.py
...
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting pip<21.0
Using cached pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
Collecting wheel
Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, pip
Successfully installed pip-20.3.4 wheel-0.36.2


rm -rf .local

./install.sh
...
tom@LinuxLaptop:~/esp/esp-idf$ ./install.sh
Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.5.2
"python3" has been detected
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, riscv32-esp-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s3-elf@esp-2020r3-8.4.0 (already installed)
Skipping riscv32-esp-elf@1.24.0.123_64eb9ff-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20200709 (already installed)
Installing Python environment and packages
Creating a new Python environment in /home/tom/.espressif/python_env/idf4.4_py3.5_env
Installing virtualenv
/usr/bin/python3: No module named pip
Traceback (most recent call last):
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1383, in action_install_python_env
import virtualenv # noqa: F401
ImportError: No module named 'virtualenv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1685, in <module>
main(sys.argv[1:])
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1681, in main
action_func(args)
File "/home/tom/esp/esp-idf/tools/idf_tools.py", line 1387, in action_install_python_env
stdout=sys.stdout, stderr=sys.stderr)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', '--user', 'virtualenv']' returned non-zero exit status 1
tom@LinuxLaptop:~/esp/esp-idf$ pyhton3 pip
No command 'pyhton3' found, did you mean:
Command 'python3' from package 'python3-minimal' (main)
pyhton3: command not found
tom@LinuxLaptop:~/esp/esp-idf$

xenpac
Posts: 25
Joined: Sun Dec 08, 2019 1:20 am

Re: install.sh failed, ubuntu 16.04

Postby xenpac » Thu Apr 22, 2021 12:54 pm

success...

rm .rf .local was a bad idea.

had to run python3 get-pip.py again.

then install.sh worked fine

Who is online

Users browsing this forum: No registered users and 72 guests