Unable to install PIP future or cryptography on msys32 for windows

User avatar
hassan789
Posts: 154
Joined: Thu Jun 29, 2017 2:15 am

Unable to install PIP future or cryptography on msys32 for windows

Postby hassan789 » Tue Sep 25, 2018 7:53 pm

Fresh install of msys32 toolchain on windows
commit: 66fd7e9cc3d5327d94b5bf681100d1e3f2cf73e1

I am unable to install PIP "future" or "cryptography"
already ran:

Code: Select all

pip install --upgrade setuptools
python -m pip install --upgrade pip
See attached pic.
Any tips?

Code: Select all

File "C:/msys32/mingw32/lib/python2.7/distutils/msvc9compiler.py", line 306, in <module>
        raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
    distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module

Code: Select all

Complete output from command python setup.py egg_info:

        No working compiler found, or bogus compiler options passed to
        the compiler from Python's standard "distutils" module.  See
        the error messages above.  Likely, the problem is not related
        to CFFI but generic to the setup.py of any Python package that
        tries to compile C code.  (Hints: on OS/X 10.8, for errors about
        -mno-fused-madd see http://stackoverflow.com/questions/22313407/
        Otherwise, see https://wiki.python.org/moin/CompLangPython or
        the IRC channel #python on irc.freenode.net.)
Attachments
msys.JPG
msys.JPG (299.12 KiB) Viewed 12363 times

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

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby ESP_Angus » Wed Sep 26, 2018 6:29 am

Hi hassan,

Thanks for raising this. I thought Python would use the prebuilt library in this case, but it seems to be trying to compile one.

Solution is to run this command:

Code: Select all

pacman -S mingw-w64-i686-python2-cryptography
Then re-running "pip install -r requirements.txt" will succeed.

Will update the docs and the MSYS2 environment to include this.

User avatar
hassan789
Posts: 154
Joined: Thu Jun 29, 2017 2:15 am

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby hassan789 » Wed Sep 26, 2018 3:59 pm

Awesome, that did the trick.
Other than this warning, everything is looking good:

Code: Select all

WARNING: Toolchain version is not supported: crosstool-ng-1.22.0-80-g6c4433a5
Expected to see version: crosstool-ng-1.22.0-80-g6c4433a

Milan991
Posts: 9
Joined: Mon Jun 18, 2018 10:02 pm

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby Milan991 » Fri Sep 28, 2018 11:31 am

I've run all the commands that you suggested:

Code: Select all

python -m pip install --upgrade setuptools
pacman -S mingw-w64-i686-python2-cryptography
But after that, when I run:

Code: Select all

python -m pip install --user -r D:/esp-idf/requirements.txt
I got a following error:
Command "python setup.py egg_info" failed with error code 1 in c:\users\011lab\appdata\local\temp\pip-install-fxrkmd\future\
What can I do to overcome this error?

Thank you in advance.

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

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby ESP_Angus » Mon Oct 01, 2018 5:23 am

Turns out that setuptools has to be installed from MSYS2, not pip. To fix the install, run the two commands mentioned here:
https://github.com/espressif/esp-idf/is ... -425790054

A new MSYS2 image without these problems will be available ASAP.

kenjyminamori
Posts: 1
Joined: Mon Oct 22, 2018 10:38 am

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby kenjyminamori » Mon Oct 22, 2018 10:40 am

This issue is still opened!


Could you please add reference to tutorial?

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

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby ESP_Angus » Tue Oct 23, 2018 3:25 am

Hi kenjy,

Try these commands in this order:

Code: Select all

python -m pip uninstall -y setuptools
pacman -S mingw-w64-i686-python2-setuptools mingw-w64-i686-python2-cryptography
python -m pip install -r $IDF_PATH/requirements.txt
(You might get an error from the first command, if setuptools is not installed via pip. As you haven't provided any details, I don't know which error you're getting.)

Alternatively, you can download a newer version of the MSYS2 .zip from here and it should "just work":
https://docs.espressif.com/projects/esp ... hain-setup

arnold.braun@gmx.de
Posts: 26
Joined: Wed Dec 20, 2017 9:39 am

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby arnold.braun@gmx.de » Thu Mar 28, 2019 5:29 am

Thanks for your post. it helped
pacman -S mingw-w64-i686-python2-cryptography

filipESP
Posts: 65
Joined: Tue Nov 06, 2018 12:42 pm

Re: Unable to install PIP future or cryptography on msys32 for windows

Postby filipESP » Fri Mar 29, 2019 8:23 am

I have similar problem but the commands above don't resolve it.
Here is my topic: https://www.esp32.com/viewtopic.php?f=13&t=9893

Who is online

Users browsing this forum: Bing [Bot] and 54 guests