pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

Can't build pymc #182

Open mgdreamingstar opened 5 years ago

mgdreamingstar commented 5 years ago

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 个无法解析的外部命令

fonnesbeck commented 5 years ago

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.

mgdreamingstar commented 5 years ago

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.

fonnesbeck commented 5 years ago

What about installing gfortran from conda?

mgdreamingstar commented 5 years ago

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

fonnesbeck commented 5 years ago

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

mgdreamingstar commented 5 years ago

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.