I can't figure out why it is not using the correct python.[cmake] Diagnostic information:
[cmake] IDF_PYTHON_ENV_PATH: C:\ESP32\.espressif\python_env\idf4.3_py3.9_env\scripts
[cmake] Python interpreter used: C:\Python\Python39\python.exe
[cmake] Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
VS Code CMake not using correct Python ENV
-
- Posts: 2
- Joined: Sun Jan 10, 2021 6:47 pm
VS Code CMake not using correct Python ENV
When I run CMake configure I Get this error:
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: VS Code CMake not using correct Python ENV
Are you using CMake Tools extension ? Or are you using another extension?
If you are using Microsoft's CMake Tools extension, you might want to set an environment variable called PYTHON with
You can also try our official extension for Visual Studio Code here
If you are using Microsoft's CMake Tools extension, you might want to set an environment variable called PYTHON with
Code: Select all
C:\ESP32\.espressif\python_env\idf4.3_py3.9_env\Scripts\python.exe
-
- Posts: 2
- Joined: Sun Jan 10, 2021 6:47 pm
Re: VS Code CMake not using correct Python ENV
Ah, I didn't realize that was coming from another extension. I did use the esp-idf extension to install but I think vs code suggested installing cmake tools as well.
I have two more issues:
1. Is after opening the project I get.
2. Is Opening the monitor fails with
I have two more issues:
1. Is after opening the project I get.
The Project builds without issues so I'm not 100% sure what is going on here.Unable to resolve configuration with compilerPath "c:/esp32/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe". Using "cl.exe" instead.
2. Is Opening the monitor fails with
Any help you can provide with these would be awesome!C:\ESP32\Projects\HRV-Main-Control>C:\ESP32\.espressif\python_env\idf4.3_py3.9_env\Scripts\python.exe C:\ESP32\esp-idf\tools\idf.py -p COM3 monitor
Traceback (most recent call last):
File "C:\ESP32\esp-idf\tools\idf.py", line 811, in <module>
main()
File "C:\ESP32\esp-idf\tools\idf.py", line 726, in main
checks_output = check_environment()
File "C:\ESP32\esp-idf\tools\idf.py", line 77, in check_environment
debug_print_idf_version()
File "C:\ESP32\esp-idf\tools\idf.py", line 132, in debug_print_idf_version
version = idf_version()
File "C:\ESP32\esp-idf\tools\idf_py_actions\tools.py", line 56, in idf_version
"--git-dir=%s" % os.path.join(os.environ["IDF_PATH"], '.git'),
File "C:\Python\Python39\lib\os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'IDF_PATH'
C:\ESP32\Projects\HRV-Main-Control>C:\ESP32\.espressif\python_env\idf4.3_py3.9_env\Scripts\python.exe C:\ESP32\esp-idf\tools\idf.py -p COM3 monitor
Traceback (most recent call last):
File "C:\ESP32\esp-idf\tools\idf.py", line 811, in <module>
main()
File "C:\ESP32\esp-idf\tools\idf.py", line 726, in main
checks_output = check_environment()
File "C:\ESP32\esp-idf\tools\idf.py", line 77, in check_environment
debug_print_idf_version()
File "C:\ESP32\esp-idf\tools\idf.py", line 132, in debug_print_idf_version
version = idf_version()
File "C:\ESP32\esp-idf\tools\idf_py_actions\tools.py", line 56, in idf_version
"--git-dir=%s" % os.path.join(os.environ["IDF_PATH"], '.git'),
File "C:\Python\Python39\lib\os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'IDF_PATH'
-
- Posts: 1
- Joined: Tue Jan 19, 2021 6:00 am
Re: VS Code CMake not using correct Python ENV
I am also having the same issues any support would be helpful
Re: VS Code CMake not using correct Python ENV
I had the same issue - I found the issue was I had the "Python" extension added in VS code. When I (disabled? uninstalled?) it - IDF builds then magically started doing the right thing.
-
- Posts: 1
- Joined: Sat Jul 24, 2021 3:42 am
Re: VS Code CMake not using correct Python ENV
I have the same issue.
It seems the system add homebrew python in PATH variable and get the python first.
It seems the system add homebrew python in PATH variable and get the python first.
Who is online
Users browsing this forum: No registered users and 35 guests