Page 1 of 1

Unable to install PIP future or cryptography on msys32 for windows

Posted: Tue Sep 25, 2018 7:53 pm
by hassan789
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.)

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

Posted: Wed Sep 26, 2018 6:29 am
by ESP_Angus
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.

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

Posted: Wed Sep 26, 2018 3:59 pm
by hassan789
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

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

Posted: Fri Sep 28, 2018 11:31 am
by Milan991
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.

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

Posted: Mon Oct 01, 2018 5:23 am
by ESP_Angus
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.

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

Posted: Mon Oct 22, 2018 10:40 am
by kenjyminamori
This issue is still opened!


Could you please add reference to tutorial?

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

Posted: Tue Oct 23, 2018 3:25 am
by ESP_Angus
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

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

Posted: Thu Mar 28, 2019 5:29 am
by arnold.braun@gmx.de
Thanks for your post. it helped
pacman -S mingw-w64-i686-python2-cryptography

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

Posted: Fri Mar 29, 2019 8:23 am
by filipESP
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