pymc2 icon indicating copy to clipboard operation
pymc2 copied to clipboard

Can't build pymc

Open mgdreamingstar opened this issue 5 years ago • 6 comments

Before trying to build pymc, I installed pymc using anaconda. However, it can't pass pymc.test(). Then I tried to build pymc using pip install pymc, but it failed. I have installed gfortran and VS2015.

flib.o : error LNK2019: 无法解析的外部符号 __powidf2,该符号在函数 cauchy_grad_b_ 中被引用 gibbsit.o : error LNK2001: 无法解析的外部符号 __powidf2 flib.o : error LNK2019: 无法解析的外部符号 _gfortran_st_write,该符号在函数 matmult_ 中被引用 gibbsit.o : error LNK2001: 无法解析的外部符号 _gfortran_st_write flib.o : error LNK2019: 无法解析的外部符号 _gfortran_transfer_character_write,该符号在函数 matmult_ 中被引用 gibbsit.o : error LNK2001: 无法解析的外部符号 _gfortran_transfer_character_write flib.o : error LNK2019: 无法解析的外部符号 _gfortran_st_write_done,该符号在函数 matmult_ 中被引用 gibbsit.o : error LNK2001: 无法解析的外部符号 _gfortran_st_write_done gibbsit.o : error LNK2019: 无法解析的外部符号 __main,该符号在函数 main 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_st_read,该符号在函数 vecinput_ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_transfer_character,该符号在函数 vecinput_ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_st_read_done,该符号在函数 vecinput_ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_transfer_integer_write,该符号在函数 vecinput_ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_transfer_real,该符号在函数 vecinput_ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_string_index,该符号在函数 oneparse_ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_iargc,该符号在函数 MAIN__ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_getarg_i4,该符号在函数 MAIN__ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_st_open,该符号在函数 MAIN__ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_transfer_real_write,该符号在函数 MAIN__ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_stop_string,该符号在函数 MAIN__ 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_set_args,该符号在函数 main 中被引用 gibbsit.o : error LNK2019: 无法解析的外部符号 _gfortran_set_options,该符号在函数 main 中被引用 build\lib.win-amd64-2.7\pymc\flib.pyd : fatal error LNK1120: 18 个无法解析的外部命令

mgdreamingstar avatar Aug 25 '18 15:08 mgdreamingstar

First, can you confirm that you are intending to build PyMC2 and not PyMC3? We recommend users build/install PyMC3 unless there is a good reason not to.

It looks like your Fortran and C compilers are not compatible with one another. I would avoid Visual Studio and use gcc and gfortran.

fonnesbeck avatar Aug 27 '18 15:08 fonnesbeck

I'm trying to build PyMC2, and trying to build it with pip install pymc, there comes many LINK errors. I try to use msys and gcc to build it, but it says str object has no attribute append.

mgdreamingstar avatar Aug 28 '18 02:08 mgdreamingstar

What about installing gfortran from conda?

fonnesbeck avatar Aug 28 '18 03:08 fonnesbeck

Can I install gfortran using conda on win10? I try to google it but can't find how.

mgdreamingstar avatar Aug 28 '18 05:08 mgdreamingstar

You should be able to get Windows binaries from gnu.org

fonnesbeck avatar Sep 04 '18 20:09 fonnesbeck

Hi, I tried mingw-w64 which has gfortran in it. It can't build pymc either. I have installed Ubuntu 16 on my computer, and I tried to build it. The process failed again.

I tried to use conda to install pymc on Ubuntu, and It passed the pymc.test(), however the windows version can't pass it installed by conda.

mgdreamingstar avatar Sep 05 '18 12:09 mgdreamingstar