Python - Can't Install Packages: TypeError: unorderable types: NoneType() >= str()

前端 未结 6 444
我在风中等你
我在风中等你 2020-12-19 10:02

System: Win7 64, Python 3.4, Pycharm 3.0.2, MinGW

Whenever I try to install a package, in Pycharm or via command line, I get this:

running install
ru         


        
6条回答
  •  醉酒成梦
    2020-12-19 10:28

    Someone recommended I try to compile a helloworld.cpp with mingw. It failed!

    The instructions I was using said I only needed to install mingw32-gcc-g++. This didn't work for me. Using the MinGW Installation Manager, I added:

    • mingw-developer-toolkit
    • mingw32-base
    • msys-base
    • mingw32-gcc-g++ (already installed previously)

    So the proper instructions are:

    1. Download the mingw-get-setup.exe installer from here: http://sourceforge.net/projects/mingw/files/Installer/
    2. Run it
    3. Install the packages mentioned above
    4. Add c:\mingw\bin\ to your path environment variable
    5. Goto c:\python34\Lib\distutils\ and create distutils.cfg
    6. Open the distutils.cfg and insert two lines

      [build]

      compiler=mingw32

    I think that compiler=mingw32 refers to mingw32.exe executable. That file didn't exist by default for me! I had to make a copy of mingw32-c++.exe and rename it mingw32.exe.

    I hope this helps someone else!

提交回复
热议问题