4

I'm trying to install a Python package called pyFM using Python 3.5.1 (64 bit) on a Windows 10 64bit machine. It's giving me the following error:

LINK : fatal error LNK1181: cannot open input file 'm.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\link.exe' failed with exit status 1181

To try to solve this, I tried installing Visual Studio 2015 with Python Toolkit as well, but this error is still coming.

I have also tried building/installing pyFM using Visual Studio 2015 Developer Command Prompt.

What else can I do to solve this ?

Please note that I'm using Python 3.5.1 (64 bit)

Ahmad
  • 12,886
  • 30
  • 93
  • 146
  • Have you uninstalled and reinstalled pyFM *after* you install VS2015? –  Mar 21 '16 at 01:05
  • I'm not able to install pyFM in the first place. – Ahmad Mar 21 '16 at 01:08
  • Could be a bug in the setup file by pyFM. See http://stackoverflow.com/questions/19333898/lnk1181-cannot-open-input-file-m-lib , which shows that the math library on Windows is not called `m`, but `msvcr` or similar. –  Mar 21 '16 at 01:08

1 Answers1

3

I had the same issue with compiling some C functions. The main python program was trying to include an 'm' library which didn't exist. I searched for msvcr inside "C:\Program Files (x86)\Microsoft Visual Studio" folder and found that there is a library named 'msvcrt', replacing 'm' with 'msvcrt' solved the issue.

Samadi
  • 41
  • 6