allenai / scispacy

A full spaCy pipeline and models for scientific/biomedical documents.
https://allenai.github.io/scispacy/
Apache License 2.0
1.72k stars 229 forks source link

Issues in Installing scispacy , Building wheel for nmslib didnt not work #487

Closed Teezq closed 1 year ago

Teezq commented 1 year ago

I have checked the required dependency: image

However, it still give me an error: Building wheel for nmslib didnt not work. Error:

error: subprocess-exited-with-error

Building wheel for nmslib (pyproject.toml) did not run successfully. exit code: 1

[22 lines of output] C:\Users\ZhenQuanTee\AppData\Local\Temp\pip-build-env-sur0gcij\overlay\Lib\site-packages\setuptools\dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options !!

      ********************************************************************************
      Usage of dash-separated 'description-file' will not be supported in future
      versions. Please use the underscore name 'description_file' instead.

      By 2023-Sep-26, you need to update your project and remove deprecated calls
      or your builds will no longer be supported.

      See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
      ********************************************************************************

!! opt = self.warn_dash_deprecation(opt, section) Dependence list: ['pybind11<2.6.2', 'psutil', "numpy>=1.10.0,<1.17 ; python_version=='2.7'", "numpy>=1.10.0 ; python_version>='3.5'"] running bdist_wheel running build running build_ext Extra compilation arguments: ['/EHsc', '/openmp', '/O2', '/DVERSION_INFO=\"2.1.1\"'] building 'nmslib' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for nmslib ERROR: Could not build wheels for nmslib, which is required to install pyproject.toml-based projects

Would appreciate if you guys could pls help. This is my final year project.

davidsbatista commented 1 year ago

I'm on macOs with an Apple M1 CPU and managed to installed nsmlib like this:

CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib

Teezq commented 1 year ago

@davidsbatista

I am running on Windows, and have encounter with this error code:

'CFLAGS' is not recognized as an internal or external command, operable program or batch file.

hyogoa2c commented 1 year ago

with poetry ( on MacOS with an Apple M1 Pro) CFLAGS="-mavx -DWARN(a)=(a)" poetry add nmslib works well

dakinggg commented 1 year ago

I highly recommend using windows subsystem for linux on windows. There are a variety issues here related to installing nmslib, and I encourage you to look for solutions there and on the nmslib repo itself. That being said, I have successfully installed nmslib using windows subsystem for linux and python 3.10 recently.

Teezq commented 1 year ago

@dakinggg Hi, thanks for the guidance but I am still struggling to find the particular repo you mentioned using windows subsystem. Could you please provide me a link ?

dakinggg commented 3 months ago

hey @Teezq could you try installing with mamba as per https://github.com/allenai/scispacy/issues/520#issue-2438749767? I'm looking to see if it works for others.