brentp / fishers_exact_test

Fishers Exact Test for Python (Cython)
BSD 3-Clause "New" or "Revised" License
62 stars 21 forks source link

LINK : error LNK2001: unresolved external symbol initfisher/cfisher #5

Open fmyzjs opened 9 years ago

fmyzjs commented 9 years ago

I am doing a project in python where I have a very large dataset where I have to do a fisher exact test. This must be done 600,000,000 times so efficiency is quite important. However, with the scipy package this takes 50 hours, but I have read that https://pypi.python.org/pypi/fisher/ should be much faster. But I don't understand how to get it installed in Windows 8.

I have tried using easy_install below:

running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\fisher
copying fisher\__init__.py -> build\lib.win32-2.7\fisher
running build_ext
building 'fisher/cfisher' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\Python27\lib\site-packages\numpy\core\include -Ic:\Python27\include -Ic:\Python27\PC /Tcsrc/cfisher.c /Fobuild\temp.win32-2.7\Release\src/cfisher.obj
cfisher.c
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\Python27\libs /LIBPATH:c:\Python27\PCbuild /EXPORT:initfisher/cfisher build\temp.win32-2.7\Release\src/cfisher.obj /OUT:build\lib.win32-2.7\fisher\cfisher.pyd /IMPLIB:build\temp.win32-2.7\Release\src\cfisher.lib /MANIFESTFILE:build\temp.win32-2.7\Release\src\cfisher.pyd.manifest
LINK : error LNK2001: unresolved external symbol initfisher/cfisher
build\temp.win32-2.7\Release\src\cfisher.lib : fatal error LNK1120: 1 unresolved externals
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120
brentp commented 9 years ago

I dont have any experience with building python C extensions on windows. Do you have math.h and numpy stuff where your compiler knows where to find them? Are you able to build other extension modules?

fmyzjs commented 9 years ago

Thank you very much for your timely reply.I have the env all i need,and i can build other extension modules

CFretter commented 9 years ago

Same problem here

Downloading https://pypi.python.org/packages/source/f/fisher/fisher-0.1.4.tar.gz#md5=bfc763b7333a1f428e4c447dd8a85968
Processing fisher-0.1.4.tar.gz
Writing c:\users\cfretter\appdata\local\temp\easy_install-2rcky6\fisher-0.1.4\setup.cfg
Running fisher-0.1.4\setup.py -q bdist_egg --dist-dir c:\users\cfretter\appdata\local\temp\easy_install-2rcky6\fisher-0.1.4\egg-di
st-tmp-3vovbe
cfisher.c
c:\anaconda\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, dis
able it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
src/cfisher.c(513) : warning C4244: 'function' : conversion from 'Py_ssize_t' to 'long', possible loss of data
src/cfisher.c(533) : warning C4244: 'function' : conversion from 'Py_ssize_t' to 'long', possible loss of data
src/cfisher.c(555) : warning C4244: 'function' : conversion from 'Py_ssize_t' to 'long', possible loss of data
src/cfisher.c(1457) : warning C4244: '=' : conversion from 'npy_intp' to 'int', possible loss of data
src/cfisher.c(1622) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1624) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1626) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1628) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1643) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1654) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(1665) : warning C4244: '+=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/cfisher.c(4739) : warning C4244: 'function' : conversion from '__int64' to 'long', possible loss of data
src/cfisher.c(6225) : warning C4267: '=' : conversion from 'size_t' to 'char', possible loss of data
src/cfisher.c(6236) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
LINK : error LNK2001: unresolved external symbol initfisher/cfisher
build\temp.win-amd64-2.7\Release\src\cfisher.lib : fatal error LNK1120: 1 unresolved externals
error: Setup script exited with error: command 'C:\\Users\\cfretter\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for P
ython\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1120
brentp commented 9 years ago

@CFretter unfortunately, I'm not familiar with windows so I can help you. Hopefully someone else who has resolved this type of thing can chime in.

DNeems-zz commented 9 years ago

I am having the same issue. Was anyone able to resolve this?