Closed moefear85 closed 1 year ago
note that virtualenv is already installed on my system.
This has little to do with ESP-IDF or this extension (although it's – among hundreds of other packages also – affected). Please also refer to https://github.com/pypa/pip/issues/11776 and https://discuss.python.org/t/pep-668-marking-python-base-environments-as-externally-managed/10302 where workarounds / solutions are discussed. I'm not sure whether this extension can do anything to work around it.
here's the beef: the extension insists on the system-wide python when its unnecessary, which would have avoided the problem. the guys at ubuntu atleast know what their talking about, and any script that needs to install packages should allow the specification of an arbitary venv for that
Added the fix in this vsix installer
I am still facing the error after installing the above vsix installer. idf_versions.txt has (1) KB idf_versions.txt progress: 100.00% (0.08 / 0.08) KB /bin/sh: 1: /home/ankit/.espressif/python_env/idf4.4_py3.11_env/: Permission denied Command failed: "/home/ankit/.espressif/python_env/idf4.4_py3.11_env/" "/media/ankit/Win_D/IOTCode/framework/esp-idf/tools/check_python_dependencies.py" -r "/media/ankit/Win_D/IOTCode/framework/esp-idf/tools/requirements/requirements.core.txt" /bin/sh: 1: /home/ankit/.espressif/python_env/idf4.4_py3.11_env/: Permission denied Installing ESP-IDF extension python packages in undefined ...
/bin/sh: 1: undefined: not found Command failed: "undefined" -m pip install --upgrade --constraint "/home/ankit/.vscode/extensions/espressif.esp-idf-extension-1.6.1/espidf.constraints.txt" --no-warn-script-location -r "/home/ankit/.vscode/extensions/espressif.esp-idf-extension-1.6.1/requirements.txt" /bin/sh: 1: undefined: not found idf_versions.txt has (1) KB idf_versions.txt progress: 100.00% (0.08 / 0.08) KB /bin/sh: 1: /home/ankit/.espressif/python_env/idf4.4_py3.11_env/: Permission denied Command failed: "/home/ankit/.espressif/python_env/idf4.4_py3.11_env/" "/media/ankit/Win_D/IOTCode/framework/esp-idf/tools/check_python_dependencies.py" -r "/media/ankit/Win_D/IOTCode/framework/esp-idf/tools/requirements/requirements.core.txt" /bin/sh: 1: /home/ankit/.espressif/python_env/idf4.4_py3.11_env/: Permission denied
You can see the issue is that your user has no permission to write in folder /home/ankit/.espressif/python_env/idf4.4_py3.11_env/
You can see the issue is that your user has no permission to write in folder
/home/ankit/.espressif/python_env/idf4.4_py3.11_env/
could you let me know how to enable it!
In a terminal write sudo chmod 777 /home/ankit/.espressif/python_env/idf4.4_py3.11_env
problem solved by putting the idf python(python virtual environment) in the settings.
OS
Linux
Operating System version
Ubuntu 23.04
Visual Studio Code version
1.77.3
ESP-IDF version
master
Python version
3.11.2
Doctor command output
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS linux x64 6.2.0-20-generic System environment variable IDF_PYTHON_ENV_PATH undefined System environment variable PATH