I'm trying to build a small Python module in C. It's just a single .C file that includes a single header file and links a single static library.
On Linux everything works as expected, but one of our team members uses Windows, so I'd like to build this module for Windows as well.
I'm using Windows 10 with Visual Studio Build Tools 2017 installed, including the VC++ 2015.3 v14.00 (v140) toolset for desktop. I'm using Python 3.6.
from setuptools import setup, Extension
drone_logger_module = Extension('DroneLogger',
include_dirs=['Output\\include'],
libraries=['DroneLoggerWindows'],
library_dirs=['x64\\Release'],
sources=['Output\\src\\DroneLogger.py.c'])
setup([...],
ext_modules=[drone_logger_module])
When I ran python setup.py bdist_wininst, I got the following output:
running bdist_wininst
running build
running build_ext
building 'DroneLogger' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IOutput\include -IC:\Users\piete\AppData\Local\Programs\Python\Python36\include -IC:\Users\piete\AppData\Local\Programs\Python\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" /TcOutput\src\DroneLogger.py.c /Fobuild\temp.win-amd64-3.6\Release\Output\src\DroneLogger.py.obj
DroneLogger.py.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:x64\Release /LIBPATH:C:\Users\piete\AppData\Local\Programs\Python\Python36\libs /LIBPATH:C:\Users\piete\AppData\Local\Programs\Python\Python36\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" DroneLoggerWindows.lib /EXPORT:PyInit_DroneLogger build\temp.win-amd64-3.6\Release\Output\src\DroneLogger.py.obj /OUT:build\lib.win-amd64-3.6\DroneLogger.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\Output\src\DroneLogger.cp36-win_amd64.lib
DroneLogger.py.obj : warning LNK4197: export 'PyInit_DroneLogger' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.6\Release\Output\src\DroneLogger.cp36-win_amd64.lib and object build\temp.win-amd64-3.6\Release\Output\src\DroneLogger.cp36-win_amd64.exp
Generating code
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed
with exit status 1158
I then followed this SO answer, and copied C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe and rcdll.dll to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\. This solved the linking problem.
I've spent days trying to get it to work on Windows, and the solution I came up with is kind of questionable (that is, I don't know why it doesn't work out of the box, and I have a feeling that I shouldn't be moving Microsoft EXEs and DLLs around just to get it working).
My question is twofold:
Is there really no better/easier way to build a Windows installer for a Python C extension?
Why does this solution work, and why is it necessary?
What might make it generally easier to compile Python extensions on Linux than on Windows is that with standard package management on Linux you will generally have the same C compiler installed that was used to compile Python itself. On Windows, you have the choice of several Visual Studio versions, mingw, cygwin.
For Windows, I find it most straightforward to use the special Visual C++ for Python 2.7 package from Microsoft, which, unlike the newer Visual Studio version used in the question asked, has rc.exe properly in its path together with the Visual C compiler.
Another solution is to install the mingw compilers and create a file distutils.cfg in Lib/distutils in the main python folder with the contents
[build]
compiler=mingw32
[build_ext]
compiler=mingw32
to use these compilers instead. Unless -static-libgcc (and -static-libstdc++ for C++ projects) is added to the linker flags, the DLLs for libgcc (and for libstdc++) must be shipped with the extension so it will work also without the mingw runtime installed/in path.
Related
I have c++ code that compiles fine in MSVS 2015 which is installed on my PC. I've been tasked to make a python extension using cython to be able to call c++ function from our python application. I have installed anaconda 5.2 w/ cython installed already. The c++ has a bunch of header files that need to be included when compiling. I'm trying to build one function and am running into the same error.
My test.pyx looks like this for the one function:
cimport test
cimport cython
def pxd_PIXCIclose():
res = test.pxd_PIXCIclose()
return res
The test.pxd is as follows:
cdef extern from "D:\epix\inc\xcliball.h":
int pxd_PIXCIclose()
setup.py is:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
ext_modules = Extension(
name = "test",
sources=["test.pyx"],
include_dirs=["D:\epix\lib", "D:\epix\inc"],
library_dirs="D:\epix\inc\XCLIBW64.lib","D:\epix\lib\PXIPLW64.lib"]
)
setup(
name = "test.pyx",
ext_modules = cythonize([ext_modules])
)
The test.c is created but then I get a bunch of build errors on the headers in the C++ include folder:
python setup.py build_ext --inplace --compiler=msvc
Compiling test.pyx because it depends on .\test.pxd.
[1/1] Cythonizing test.pyx
running build_ext
building 'test' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\epix\lib -ID:\epix\inc -
IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files
(x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\winrt" /Tctest.c
/Fobuild\temp.win-amd64-3.6\Release\test.obj
test.c
d:\epix\inc\pxlibsv.h(312): error C2061: syntax error: identifier 'HANDLE'
d:\epix\inc\pxlibsv.h(317): error C2059: syntax error: '}'
d:\epix\inc\pxlibsv.h(827): error C2143: syntax error: missing ')' before
'*'
d:\epix\inc\pxlibsv.h(827): error C2081: 'HANDLE': name in formal parameter
list illegal
d:\epix\inc\pxlibsv.h(827): error C2143: syntax error: missing ';' before
'*'
d:\epix\inc\pxlibsv.h(827): error C2059: syntax error: '*'
.
.
.
d:\epix\inc\xclibsc.h(369): fatal error C1003: error count exceeds 100;
stopping compilation
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
I'm guessing my setup.py is not correct? Anyone have any pointers on what is happening?
Update to my original post, by adding #include windows.h, the original 'HANDLE' error is now gone but I received this link error now:
(base) d:\epix\cython>python setup.py build_ext --inplace --compiler=msvc
running build_ext
building 'test' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Anaconda3\include -ID:\epix\lib -
ID:\epix\inc -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program
Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files
(x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.10586.0\winrt" /Tctest.c
/Fobuild\temp.win-amd64-3.6\Release\test.obj
test.c
C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL
/MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Anaconda3\Lib
/LIBPATH:D:\epix\inc\XCLIBW64.lib /LIBPATH:D:\epix\lib\PXIPLW64.lib
/LIBPATH:C:\Anaconda3\libs /LIBPATH:C:\Anaconda3\PCbuild\amd64
"/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64"
"/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows
Kits\10\lib\10.0.10586.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows
Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows
Kits\10\lib\10.0.10586.0\um\x64" /EXPORT:PyInit_test build\temp.win-amd64-
3.6\Release\test.obj /OUT:d:\epix\cython\test.cp36-win_amd64.pyd
/IMPLIB:build\temp.win-amd64-3.6\Release\test.cp36-win_amd64.lib
test.obj : warning LNK4197: export 'PyInit_test' specified multiple times;
using first specification
Creating library build\temp.win-amd64-3.6\Release\test.cp36-win_amd64.lib
and object build\temp.win-amd64-3.6\Release\test.cp36-win_amd64.exp
test.obj : error LNK2001: unresolved external symbol pxd_PIXCIclose
d:\epix\cython\test.cp36-win_amd64.pyd : fatal error LNK1120: 1 unresolved
externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120
Any suggestions on resolving this error? Thank you.
Based on compiler output, HANDLE is not defined. Did you know, that with VS2015 you need to add path to SDK ? It is not included, as I can see. Add C:\Program Files (x86)\Windows Kits\10 \ include\ platformtoolset\um to path. Platformtoolset will define subfolder in yours include path. Hope it helps.
By adding #include windows.h to my header and then changing my original setup.py to the following:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
ext_modules = Extension(
name = "test",
sources=["test.pyx"],
include_dirs=["D:\epix\lib", "D:\epix\inc"],
library_dirs=["D:\epix\inc"],
libraries=["XCLIBW64", "PXIPLW64"]
)
setup(
name = "test.pyx",
ext_modules = cythonize([ext_modules])
I was able to successfully cythonize one of the functions in my c project. Thank you to all who gave me suggestions that pointed me in the right direction.
I want to use openfst python wrapper on my python application.
When I run
pip install openfst
for Python 3.6 gave error as the following.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\aliye\Anaconda3\include -IC:\Users\aliye\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tppywrapfst.cc /Fobuild\temp.win-amd64-3.6\Release\pywrapfst.obj -std=c++11 -Wno-unneeded-internal-declaration -Wno-unused-function
cl : Command line error D8021 : invalid numeric argument '/Wno-unneeded-internal-declaration'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Obviously, it looks like the Visual Studio compiler is complaining about /Wno-unneeded-internal-declaration flag while it is trying to build the C extensions.
The easiest solution would be to download a pre-compiled version that matches your system at their website
Also, based on their site, it seems that they used Visual Studio 2013.You may be able to install and compile it using VS13.
I am trying to install QuantLib Python. So, I followed through and installed:
1) Anaconda3, boost_1_64_0, QuantLib-1.10, QuantLib-SWIG-1.10,swigwin-3.0.12.
2) I installed using Visual Studio 2017, QuantLib. I followed a youtube video and managed to install it correctly and run an example.
3) Then I switched back to the indications in http://quantlib.org/install/windows-python.shtml, I execute the commands:
cd C:\local\QuantLib-SWIG-1.10\Python
set QL_DIR=C:\local\QuantLib-1.10
set INCLUDE=C:\local\boost_1_64_0
python setup.py build
but it fails...summarizing what I get:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\local\Anaconda3\libs /LIBPATH:C:\local\Anaconda3\PCbuild\amd64 /LIBPATH:C:\local\QuantLib-1.10\lib "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64" /EXPORT:PyInit__QuantLib build\temp.win-amd64-3.6\Release\QuantLib/quantlib_wrap.obj /OUT:build\lib.win-amd64-3.6\QuantLib_QuantLib.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\QuantLib_QuantLib.cp36-win_amd64.lib /subsystem:windows /machine:x64
LINK : fatal error LNK1104: cannot open file 'QuantLib-vc140-x64-mt.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1104
I do have two files QuantLib-vc141-mt-gd.lib and QuantLib-vc141-mt.lib inside the folder C:\local\QuantLib-1.10\lib. I am sure the problem has to do with some path that I am not assigning correctly, but I don't know what else to try. Thanks!
Your paths are correct, but Python is using Visual Studio 2015 (because it's what it was compiled with) and the library you have was produced with Visual Studio 2017. If you use the 2015 version throughout, it should work.
I also met this question, the error info gives it cannot find vc140 lib file, which should be the result of vs2015. I tried on another PC with vs2015 and it did work.
If you find the version doesn't matter, here is another choice QL.whl. Finding your .whl file and install by
pip install [some.whl]
Trying to do a simple pip install TA-lib but am getting errors, in install Microsoft visual studios 14 but still the problem persists.
error code http://pastebin.com/h4jHWd1m
I tried to install it manually but get this:
setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running install
running build
running build_py
running build_ext
building 'talib.common' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python36-32\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Python36-32\include -IC:\Python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tctalib/common.c /Fobuild\temp.win32-3.6\Release\talib/common.obj
common.c
talib/common.c(240): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
The problem seems to be the same, any ideas ?
SOLVED. I had to download this and unzip to c:\
See https://github.com/mrjbq7/ta-lib#dependencies
Download file TA_Lib-0.4.24-cp37-cp37m-win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
then use pip install TA_Lib-0.4.24-cp37-cp37m-win_amd64.whl
I am trying to use F2py to run a Fortran code in Python, however I am not an expert in Python. I am using Python version 3.5.1 and Anaconda 4.0.0
Every single F2py tutorial says that one should execute for example:
f2py -c -m fib3 fib3.f
to compile a Fortran code fib3 in python, so after that I should be able to use the Fortran subroutine importing it at python. However I found that even the plain and simple f2py cannot be imported in Python from Anaconda
I tried
import numpy as np
np.f2py
and it says f2py is not a module so to execute the f2py tutorial command I had to do:
python C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\Scripts\f2py.py -c -m fib3 fib3.f
And using the folder script address looks like it can load f2py in the command line but in the end of the execution of this code I was getting the error when there is no Visual Studio detected, so I installed Visual Studio compatible with my Python version. Now the code is "working" but in the end I get this error and no module is created:
Failed with exit status 1112
the error that was happenning before I installed the visual studio was:
Unable to find vcvarsall.bat
so It stopped after I installed visual studio. I am running everything from CMD.
First of all I would like to ask:
Is there anyway easier to use f2py? I mean, another python version or installer? Because the tutorials shows it in a simple way just calling f2py but I am not even able to do that at this Anaconda version. And how could I fix this problem of the failed with exit status?
edit: When I say "working" I meant that it went one step further however not actually working. My fortran compiler is Gfortran. I actually used to use Force however Python was not detecting, so I downloaded Gfortran.
the output log is here:
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "fib1" sources
f2py options: []
f2py:> C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fib1module.c
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5
Reading fortran codes...
Reading file 'fib1.f' (format:fix,strict)
Post-processing...
Block: fib1
Block: fib
Post-processing (stage 2)...
Building modules...
Building module "fib1"...
Constructing wrapper function "fib"...
a = fib(n)
Wrote C/API module "fib1" to file "C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fib1module.c"
adding 'C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fortranobject.c' to sources.
adding 'C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5' to include_dirs.
copying C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\f2py\src\fortranobject.c -> C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5
copying C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\f2py\src\fortranobject.h -> C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5
build_src: building npy-pkg config files
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Found executable C:\Program Files (x86)\gfortran\bin\gfortran.exe
Found executable C:\Program Files (x86)\gfortran\bin\gfortran.exe
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'fib1' extension
compiling C sources
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_
creating C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5 -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\include -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fib1module.c /FoC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fib1module.obj
Found executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5 -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\include -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fortranobject.c /FoC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fortranobject.obj
compiling Fortran sources
Fortran f77 compiler: C:\Program Files (x86)\gfortran\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -O0
Fortran f90 compiler: C:\Program Files (x86)\gfortran\bin\gfortran.exe -Wall -g -fno-second-underscore -O0
Fortran fix compiler: C:\Program Files (x86)\gfortran\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O0
compile options: '-IC:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5 -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\include -IC:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\include -c'
gfortran.exe:f77: fib1.f
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:"c:\program files (x86)\gfortran\lib" /LIBPATH:"c:\program files (x86)\gfortran\lib\gcc\i586-pc-mingw32\4.5.0" /LIBPATH:C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\libs /LIBPATH:C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\PCbuild\amd64 /LIBPATH:C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\libs /LIBPATH:C:\Users\pmachado3\AppData\Local\Continuum\Anaconda3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" /EXPORT:PyInit_fib1 C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fib1module.obj C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fortranobject.obj C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\fib1.o /OUT:.\fib1.cp35-win_amd64.pyd /IMPLIB:C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\src.win-amd64-3.5\fib1.cp35-win_amd64.lib
Found executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe
C:\Users\PMACHA~1\AppData\Local\Temp\tmpo0tr52i_\Release\fib1.o : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
It looks different from what appears on CMD window, It here doesnt show the exit status 1112. I am not sure how to copi the CMD output I just used "I clip"