Python pip install errors (feather-format)
Question: I've been trying to install the Feather file format for Python
(<https://pypi.python.org/pypi/feather-format>) for the last few days with no
luck. I'm using Anaconda2 on Windows 10. I get the following errors when I try
to pip install feather-format:

    
    
     Collecting feather-format
          Using cached feather-format-0.2.0.tar.gz
        Requirement already satisfied (use --upgrade to upgrade): cython>=0.21 in c:\users\pete\anaconda2\lib\site-packages (from feather-format)
        Building wheels for collected packages: feather-format
          Running setup.py bdist_wheel for feather-format ... error
          Complete output from command C:\Users\pete\Anaconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pete\\appdata\\local\\temp\\pip-build-g4egjo\\feather-format\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\pete\appdata\local\temp\tmp1gwqlopip-wheel- --python-tag cp27:
          running bdist_wheel
          running build
          running build_py
          creating build
          creating build\lib.win-amd64-2.7
          creating build\lib.win-amd64-2.7\feather
          copying feather\api.py -> build\lib.win-amd64-2.7\feather
          copying feather\compat.py -> build\lib.win-amd64-2.7\feather
          copying feather\version.py -> build\lib.win-amd64-2.7\feather
          copying feather\__init__.py -> build\lib.win-amd64-2.7\feather
          creating build\lib.win-amd64-2.7\feather\tests
          copying feather\tests\test_reader.py -> build\lib.win-amd64-2.7\feather\tests
          copying feather\tests\__init__.py -> build\lib.win-amd64-2.7\feather\tests
          copying feather\libfeather.pxd -> build\lib.win-amd64-2.7\feather
          copying feather\ext.pyx -> build\lib.win-amd64-2.7\feather
          running build_ext
          building 'feather.ext' extension
          creating build\temp.win-amd64-2.7
          creating build\temp.win-amd64-2.7\Release
          creating build\temp.win-amd64-2.7\Release\feather
          creating build\temp.win-amd64-2.7\Release\src
          creating build\temp.win-amd64-2.7\Release\src\feather
          C:\Users\pete\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ifeather -IC:\Users\pete\Anaconda2\lib\site-packages\numpy\core\include -Ic:\users\pete\appdata\local\temp\pip-build-g4egjo\feather-format\src -IC:\Users\pete\Anaconda2\include -IC:\Users\pete\Anaconda2\PC /Tpfeather/ext.cpp /Fobuild\temp.win-amd64-2.7\Release\feather/ext.obj -std=c++11 -O3
          cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
          cl : Command line warning D9002 : ignoring unknown option '-O3'
          ext.cpp
          C:\Users\pete\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
          feather/ext.cpp(279) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
          error: command 'C:\\Users\\pete\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
    
          ----------------------------------------
          Failed building wheel for feather-format
          Running setup.py clean for feather-format
        Failed to build feather-format
        Installing collected packages: feather-format
          Running setup.py install for feather-format ... error
            Complete output from command C:\Users\pete\Anaconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pete\\appdata\\local\\temp\\pip-build-g4egjo\\feather-format\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\pete\appdata\local\temp\pip-itehjl-record\install-record.txt --single-version-externally-managed --compile:
            Compiling feather/ext.pyx because it changed.
            [1/1] Cythonizing feather/ext.pyx
            running install
            running build
            running build_py
            creating build
            creating build\lib.win-amd64-2.7
            creating build\lib.win-amd64-2.7\feather
            copying feather\api.py -> build\lib.win-amd64-2.7\feather
            copying feather\compat.py -> build\lib.win-amd64-2.7\feather
            copying feather\version.py -> build\lib.win-amd64-2.7\feather
            copying feather\__init__.py -> build\lib.win-amd64-2.7\feather
            creating build\lib.win-amd64-2.7\feather\tests
            copying feather\tests\test_reader.py -> build\lib.win-amd64-2.7\feather\tests
            copying feather\tests\__init__.py -> build\lib.win-amd64-2.7\feather\tests
            copying feather\libfeather.pxd -> build\lib.win-amd64-2.7\feather
            copying feather\ext.pyx -> build\lib.win-amd64-2.7\feather
            running build_ext
            building 'feather.ext' extension
            creating build\temp.win-amd64-2.7
            creating build\temp.win-amd64-2.7\Release
            creating build\temp.win-amd64-2.7\Release\feather
            creating build\temp.win-amd64-2.7\Release\src
            creating build\temp.win-amd64-2.7\Release\src\feather
            C:\Users\pete\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ifeather -IC:\Users\pete\Anaconda2\lib\site-packages\numpy\core\include -Ic:\users\pete\appdata\local\temp\pip-build-g4egjo\feather-format\src -IC:\Users\pete\Anaconda2\include -IC:\Users\pete\Anaconda2\PC /Tpfeather/ext.cpp /Fobuild\temp.win-amd64-2.7\Release\feather/ext.obj -std=c++11 -O3
            cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
            cl : Command line warning D9002 : ignoring unknown option '-O3'
            ext.cpp
            C:\Users\pete\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
            feather/ext.cpp(303) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
            error: command 'C:\\Users\\pete\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
    
            ----------------------------------------
        Command "C:\Users\pete\Anaconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pete\\appdata\\local\\temp\\pip-build-g4egjo\\feather-format\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\pete\appdata\local\temp\pip-itehjl-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\pete\appdata\local\temp\pip-build-g4egjo\feather-format\
        You are using pip version 8.1.1, however version 8.1.2 is available.
        You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    

It all seems to have to do with c++. I've installed (and reinstalled) the
Microsoft Visual C++ Compiler for Python (<https://www.microsoft.com/en-
us/download/details.aspx?id=44266>). I also installed Visual Studio 2015.

I **am** able to install feather-format using

    
    
    conda install feather-format
    

but I get the following errors when I include feather in a script:

    
    
    Unhandled exception in thread started by <function wrapper at 0x000000001967B208>
    Traceback (most recent call last):
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
        fn(*args, **kwargs)
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
        autoreload.raise_last_exception()
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\utils\autoreload.py", line 249, in raise_last_exception
        six.reraise(*_exception)
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
        fn(*args, **kwargs)
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\__init__.py", line 18, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\apps\registry.py", line 108, in populate
        app_config.import_models(all_models)
      File "C:\Users\pete\Anaconda2\lib\site-packages\django\apps\config.py", line 202, in import_models
        self.models_module = import_module(models_module_name)
      File "C:\Users\pete\Anaconda2\lib\importlib\__init__.py", line 37, in import_module
        __import__(name)
      File "C:\Users\pete\Projects\datm2\core\models.py", line 22, in <module>
        import feather
      File "C:\Users\pete\Anaconda2\lib\site-packages\feather\__init__.py", line 17, in <module>
        from feather.api import read_dataframe, write_dataframe
      File "C:\Users\pete\Anaconda2\lib\site-packages\feather\api.py", line 21, in <module>
        import feather.ext as ext
    ImportError: No module named ext
    

It cant seem to compile (?) the file "ext.pyx" from the source directory. Any
help would be appreciated and thanks very much.


Answer: I have faced the same problem when I was installing Feather Format for Python.
You can try this code on your Command Line

    
    
    conda install feather-format -c conda-forge 
    

The reason of the error might be the wrong compiler for C++, you can use
conda-forge as a compiler. This has already integrated in Anaconda.

