Python requrements --- esp-windows-curses and sys_platform == 'win32'

kacie_23
Posts: 5
Joined: Fri Nov 22, 2019 7:21 pm

Python requrements --- esp-windows-curses and sys_platform == 'win32'

Postby kacie_23 » Fri Nov 22, 2019 8:06 pm

Hello,

I am fairly new to the ESP-IDF, and I am trying to set up a Visual Studio Code environment for the ESP-IDF on Windows 10.
I have found very few sources on how to do this, and very few examples on a complete working environment.

The setup is using MSYS, with the traditional setup for windows, and the esp-idf and xtensa-esp32-elf seem to be installed and ready.
The current project looks is attached:
ESP32_IDF_T.rar
This is work in progress, but I have encountered a quite strange problem.

Firstly ... the following output is causing me some problems:

Code: Untitled.bsh Select all


C:/msys32/esp/esp-idf\requirements.txt
Namespace(requirements='C:/msys32/esp/esp-idf\\requirements.txt')
The following Python requirements are not satisfied:
esp-windows-curses; sys_platform == 'win32'
I tried to fix this with the following command:

pip install -r C:\msys32\esp\esp-idf\requirements.txt ---- and esp-windows-curses version 0.1 is installed in Python, but the problem persist, and the message is not going away.

I tried to delete the line
file://${IDF_PATH}/tools/kconfig_new/esp-windows-curses; sys_platform == 'win32', from the requirements.txt, but this does not seem to be a good alternative.

An attitional problem is the mesage :

Code: Untitled.bsh Select all


<command-line>: fatal error: curses.h: No such file or directory


And I just assume that this have something to do with the Python requirements.

When I try to run the make process, I get the following output:

Code: Untitled.bsh Select all


> Executing task: make -j8 V=1 <

Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
cygpath [-c HANDLE]
cygpath [-ADHOPSW]
cygpath [-F ID]

Convert Unix and Windows format paths, or output system path information

Output type options:

-d, --dos print DOS (short) form of NAMEs (C:\PROGRA~1\)
-m, --mixed like --windows, but with regular slashes (C:/WINNT)
-M, --mode report on mode of file (binmode or textmode)
-u, --unix (default) print Unix form of NAMEs (/cygdrive/c/winnt)
-w, --windows print Windows form of NAMEs (C:\WINNT)
-t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or 'windows'

Path conversion options:

-a, --absolute output absolute path
-l, --long-name print Windows long form of NAMEs (with -w, -m only)
-p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')
-U, --proc-cygdrive Emit /proc/cygdrive path instead of cygdrive prefix
when converting Windows path to UNIX path.
-s, --short-name print DOS (short) form of NAMEs (with -w, -m only)
-C, --codepage CP print DOS, Windows, or mixed pathname in Windows
codepage CP. CP can be a numeric codepage identifier,
or one of the reserved words ANSI, OEM, or UTF8.
If this option is missing, cygpath defaults to the
character set defined by the current locale.

System information:

-A, --allusers use `All Users' instead of current user for -D, -O, -P
-D, --desktop output `Desktop' directory and exit
-H, --homeroot output `Profiles' directory (home root) and exit
-O, --mydocs output `My Documents' directory and exit
-P, --smprograms output Start Menu `Programs' directory and exit
-S, --sysdir output system directory and exit
-W, --windir output `Windows' directory and exit
-F, --folder ID output special folder with numeric ID and exit
Try `cygpath --help' for more information.

# mconf-idf is used only in MSYS
python /esp/esp-idf/tools/check_python_dependencies.py
MAKEFLAGS="" CC=cc LD=ld \
make -C /esp/esp-idf/tools/kconfig
make[1]: Entering directory '/esp/esp-idf/tools/kconfig'
cc -c -DCURSES_LOC="<curses.h>" -DLOCALE -MMD -MP -I "." -I "/esp/esp-idf/tools/kconfig" /esp/esp-idf/tools/kconfig/mconf.c -o mconf.o
<command-line>: fatal error: curses.h: No such file or directory
compilation terminated.
make[1]: *** [Makefile:173: mconf.o] Error 1
make[1]: Leaving directory '/esp/esp-idf/tools/kconfig'
C:/msys32/esp/esp-idf\requirements.txt
Namespace(requirements='C:/msys32/esp/esp-idf\\requirements.txt')
The following Python requirements are not satisfied:
esp-windows-curses; sys_platform == 'win32'
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
make: *** No rule to make target 'check_python_dependencies', needed by 'all'. Stop.
The terminal process terminated with exit code: 2

Terminal will be reused by tasks, press any key to close it.

User avatar
Roland
Espressif staff
Espressif staff
Posts: 272
Joined: Tue Oct 09, 2018 10:28 am

Re: Python requrements --- esp-windows-curses and sys_platform == 'win32'

Postby Roland » Mon Nov 25, 2019 8:48 am

I would recommend to use the Windows tools installer and consequently, the windows command line to setup IDF for use of Visual Studio Code.

And please use IDF version v4.0 for now as there are a couple of issues in the master branch we have already fixed internally but are not yet published.

kacie_23
Posts: 5
Joined: Fri Nov 22, 2019 7:21 pm

Re: Python requrements --- esp-windows-curses and sys_platform == 'win32'

Postby kacie_23 » Fri Nov 29, 2019 8:16 pm

Thank you.
I have tried 4 different approaches with Msys2, Windows installer and VS Code, and none have worked perfectly.
It is a bit painful to use the ESP-IDF with VS Code, but I am sure that It will be great eventually.

I will use PlatformIO as a temporary solution, since this seem to work quite well.
But I would prefer to use the ESP-IDF direcly without any 3-rd party solution.

Aussie Susan
Posts: 51
Joined: Thu Aug 22, 2019 3:48 am

Re: Python requrements --- esp-windows-curses and sys_platform == 'win32'

Postby Aussie Susan » Mon Dec 02, 2019 2:33 am

The issue I've had with PlatformIO is that the SDK is V3 whereas the functions I wanted to use (in the BLE area) were all in V4.
Looking at the Platform IO forums, they all seem to be waiting for someone in the ESP32 world to port the V4 SDK over to them.
(Note that this experience was a month or so ago - I've not had time to try since)
Susan

joczek
Posts: 1
Joined: Tue Apr 06, 2021 4:24 pm

Re: Python requrements --- esp-windows-curses and sys_platform == 'win32'

Postby joczek » Tue Apr 06, 2021 4:35 pm

Hi there,

after using 4.0.2 for a while, I noticed some limitations so I considered going 4.2.

04/2021 tryin' to get v4.2 of esp-idf up and running on my system while using python 3.9 (dont know if this is relevant).
However, I'm currently facing the same issue seeing this when trying to build inside CLion:

Code: Select all

The following Python requirements are not satisfied:
esp-windows-curses; sys_platform == 'win32'
To install the missing packages, please run "C:\Users\user1\esp\esp-idf\install.bat"
Diagnostic information:
    IDF_PYTHON_ENV_PATH: C:\Users\user1\AppData\Local\Programs\Python\Python39\python.exe
    Python interpreter used: C:\Users\user1\AppData\Local\Programs\Python\Python39\python.exe
CMake Error at C:/Users/user1/esp/esp-idf/tools/cmake/build.cmake:271 (message):
  Some Python dependencies must be installed.  Check above message for
  details.
has there been any progress or suggestion on how to make it somewhat usable on windows machines? as a note: I used the Installer v2.3 to install esp-idf.

User avatar
Roland
Espressif staff
Espressif staff
Posts: 272
Joined: Tue Oct 09, 2018 10:28 am

Re: Python requrements --- esp-windows-curses and sys_platform == 'win32'

Postby Roland » Wed Apr 07, 2021 12:14 pm

https://github.com/espressif/idf-installer

There has been a lot of improvements regarding this. The newer versions of the installes setup a custom Python for ESP-IDF.

The issue is caused by the fact that IDE tools can pick up other Python interpreters different to the one which export.bat is working with.

Who is online

Users browsing this forum: Barkrowler, trendictionbot and 3 guests