Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINK : fatal error LNK1181: cannot open input file 'm.lib' #18

Open
hshteingart opened this issue Sep 15, 2016 · 8 comments
Open

LINK : fatal error LNK1181: cannot open input file 'm.lib' #18

hshteingart opened this issue Sep 15, 2016 · 8 comments

Comments

@hshteingart
Copy link

pip install in windows first required the"Visual C++ Build Tools" but now fails due to LINK : fatal error LNK1181: cannot open input file 'm.lib'

@huaxiaohua
Copy link

I have the same problem ,how do you solve it?

@arjunbahl
Copy link

If possible can someone upload its wheel, like on http://www.lfd.uci.edu/~gohlke/pythonlibs

@Darinyazanr
Copy link

How to slove this Q?

@NehKulkarni
Copy link

NehKulkarni commented Nov 6, 2017

Download the pyFM project
After installing Visual C++ Build Tools, do the following:
Remove the parameter : libraries=["m"] in the setup.py file and save it
Run the setup.py using : python setup.py install

It worked for me.. hope it helps! :)

@tiancaipipi110
Copy link

need more details @NehKulkarni

@NehKulkarni
Copy link

@tiancaipipi110 Please make sure that your setup.py file looks like this:

setup(
maintainer='Corey Lynch',
name='pyfm',
packages=find_packages(),
url='https://github.com/coreylynch/pyFM',
cmdclass = {'build_ext': build_ext},
ext_modules = [Extension("pyfm_fast", ["pyfm_fast.pyx"],
include_dirs=[numpy.get_include()])]
)

We just need to remove the libraries=["m"] parameter from it.
Hope this helps! :)

@mustkem
Copy link

mustkem commented Jan 19, 2022

@NehKulkarni
For people coming from different languages - would be good if you could add more details like - where to edit this file or what is the location of this file?

@omarbo4k4
Copy link

i still get the same problem even i don't have this line in my setup.py file

eyasayesh added a commit to eyasayesh/pycortex that referenced this issue Feb 11, 2024
Removing 'm' from library to deal with error error LINK1181.

Source:
coreylynch/pyFM#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants