pyelftools failes to install

TheBrick
Posts: 8
Joined: Wed May 08, 2019 8:24 am

pyelftools failes to install

Postby TheBrick » Wed May 08, 2019 8:34 am

Hello all,

Yes its one of those horrible initial install problems inevitable when setting up a new dev env which every experienced used will be shaking their head at the posters stupidity.

I am installing esp idf as per the getting started guide on windows.
https://docs.espressif.com/projects/esp ... et-esp-idf

When running:

Code: Select all

python2 -m pip install --user -r $IDF_PATH/requirements.txt
I ran into problems with the cryptography package. This seems to be a common problem so I ran

Code: Select all

python2 -m pip uninstall -y setuptools 
pacman -S mingw-w64-i686-python2-setuptools mingw-w64-i686-python2-cryptography
as per some forum posts on here. I have then run into problems with the last package in requirments.txt, pyelftools.

if I run

Code: Select all

python2 -m pip install pyelftools
I get

Code: Select all

Collecting pyelftools
  Using cached https://files.pythonhosted.org/packages/fa/9a/0674cb1725196568bdbca98304f2efb17368b57af1a4bb3fc772c026f474/pyelftools-0.25.tar.gz
      0 [main] python2 765 child_info_fork::abort: address space needed by 'array.dll' (0x1E0000) is already occupied
    ERROR: Error [Errno 11] Resource temporarily unavailable while executing command python setup.py egg_info
ERROR: Could not install packages due to an EnvironmentError: [Errno 11] Resource temporarily unavailable
Could someone please give me a push in the correct direction.

Many Thanks

Tommy

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

Re: pyelftools failes to install

Postby ESP_Roland » Thu May 09, 2019 8:15 am

Hello TheBrick!

Did you download the ZIPed MSYS environment from the following link?
https://docs.espressif.com/projects/esp ... hain-setup

If you do so then the cryptography package should have been already included (together with the python interpreter).

Why are you have to use python2? "python" should be also a Python 2 interpreter.

What is the output the following command?

Code: Select all

which python2

TheBrick
Posts: 8
Joined: Wed May 08, 2019 8:24 am

Re: pyelftools failes to install

Postby TheBrick » Sun May 12, 2019 4:40 pm

Hi Roland,

Apologies for the slow reply am travelling / working.

That is indeed where I downloaded the mys2 from.

It was the next step within, Get ESP-IDF it titled "Installing required python packages":
https://docs.espressif.com/projects/esp ... n-packages

That failed. Python2 and the dependencies where defiantly not already installed.

TheBrick
Posts: 8
Joined: Wed May 08, 2019 8:24 am

Re: pyelftools failes to install

Postby TheBrick » Sun May 12, 2019 5:39 pm

Hi Roland

Apologies for slow reply I have been working and travelling.

I am on Python 2.7.15

I did install from that link but no python installed so I used PACMAN to install python 2.

The problem occurred after installing msys2 during the "installing required python packages" section
https://docs.espressif.com/projects/esp ... n-packages

TheBrick
Posts: 8
Joined: Wed May 08, 2019 8:24 am

Re: pyelftools failes to install

Postby TheBrick » Sun May 12, 2019 6:21 pm

Apologises I misread your request for command output.

Code: Select all

$ which python2
/usr/bin/python2

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: pyelftools failes to install

Postby ESP_Angus » Mon May 13, 2019 3:50 am

Hi TheBrick,

You need to run MSYS2 via the "mingw32.exe" or "MINGW32 Shell" launcher link. This sets up some different paths so your "python" will be /mingw32/bin/python .

MSYS2 has multiple different kinds of binaries all bundled in it, and they're only partly cross-compatible, so it can get a bit confusing.

In ESP-IDF V4.0 we plan to switch to cmake build system as the default and the Windows experience for developers should get a bit more familiar.

TheBrick
Posts: 8
Joined: Wed May 08, 2019 8:24 am

Re: pyelftools failes to install

Postby TheBrick » Tue May 14, 2019 3:43 am

Ah Ha!!

That will indeed make a big difference! Thanks you ESP_Angus. I shall endeavor to continue with setting up my build system later in the week as time allows.

Who is online

Users browsing this forum: Baidu [Spider] and 86 guests