Clean install of Vscode Extension fails on python

dirkvermaak
Posts: 1
Joined: Wed Oct 06, 2021 10:41 am

Clean install of Vscode Extension fails on python

Postby dirkvermaak » Wed Oct 06, 2021 12:24 pm

Hello,

I am running on on Windows 10 and have just done a 'clean' installation of the ESP-IDF Extension for Visual Studio Code. The version I have installed is v1.2.0.

Following a restart, I installed the esp-idf and the tools, however the tools installation fails with the following error.

Code: Select all

Command failed: c:\Users\Dirk\.espressif\tools\idf-python\3.8.7\python.exe C:\Users\Dirk\esp\esp-idf\tools\idf_tools.py install-python-env
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'c:\Users\Dirk\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env\\Scripts\\python.exe'
  sys.base_prefix = 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env'
  sys.base_exec_prefix = 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env'
  sys.executable = 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env\\Scripts\\python.exe'
  sys.prefix = 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env'
  sys.exec_prefix = 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env'
  sys.path = [
    'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env\\Scripts\\python38.zip',
    'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env\\DLLs',
    'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env\\lib',
    'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env\\Scripts',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
Traceback (most recent call last):
  File "encodings\__init__.py", line 33, in <module>
ImportError: cannot import name 'aliases' from partially initialized module 'encodings' (most likely due to a circular import) (c:\Users\Dirk\.espressif\python_env\idf4.3_py3.8_env\lib\encodings\__init__.pyc)
Traceback (most recent call last):
  File "C:\Users\Dirk\esp\esp-idf\tools\idf_tools.py", line 1675, in <module>
    main(sys.argv[1:])
  File "C:\Users\Dirk\esp\esp-idf\tools\idf_tools.py", line 1671, in main
    action_func(args)
  File "C:\Users\Dirk\esp\esp-idf\tools\idf_tools.py", line 1379, in action_install_python_env
    subprocess.check_call([sys.executable, '-m', 'virtualenv', idf_python_env_path],
  File "subprocess.py", line 364, in check_call
subprocess.CalledProcessError: Command '['c:\\Users\\Dirk\\.espressif\\tools\\idf-python\\3.8.7\\python.exe', '-m', 'virtualenv', 'c:\\Users\\Dirk\\.espressif\\python_env\\idf4.3_py3.8_env']' returned non-zero exit status 100.
I have found some references to this sort of error, but the answers seem to conflict. I appreciate it is something to do with the Python environment but don't know what.

Many Thanks for any help,

Dirk.

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: Clean install of Vscode Extension fails on python

Postby ESP_bignacio » Fri Oct 29, 2021 6:38 am

Hey Dirk sorry for late reply.

Could you please try this [vsix installer](https://nightly.link/espressif/vscode-e ... 830649.zip) we made several fixes to the setup wizard and hopefully your issue is already fixed.

Here is how to install an extension from a vsix file.

Who is online

Users browsing this forum: No registered users and 9 guests