allenai / scispacy

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

nmslib install error using a conda env on mac m1 #455

Closed briangriner closed 1 year ago

briangriner commented 1 year ago

I tried to install scispacy in a conda env on a mac mini with m1 chip but had problems with dependencies related to python=3.6. (e.g. installing jupyter). I then tried cloning the base env into a new env and then install scispacy from pip and obtained the error below with the dependency: python_version=='2.7' on line 12 below. Any suggestions would be greatly appreciated.

Building wheels for collected packages: nmslib Building wheel for nmslib (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [27 lines of output] 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'"] /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running bdist_wheel running build running build_ext creating var creating var/folders creating var/folders/1c creating var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn creating var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include/python3.9 -c /var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmpwt_qxhx3.cpp -o var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmpwt_qxhx3.o -std=c++14 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include/python3.9 -c /var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmpnd3rxlik.cpp -o var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmpnd3rxlik.o -fvisibility=hidden Extra compilation arguments: ['-O3', '-march=native', '-stdlib=libc++', '-mmacosx-version-min=10.7', '-DVERSION_INFO="2.1.1"', '-std=c++14', '-fvisibility=hidden'] building 'nmslib' extension creating build creating build/temp.macosx-11.1-arm64-cpython-39 creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search/src creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search/src/method creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search/src/space creating build/temp.macosx-11.1-arm64-cpython-39/tensorflow clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I./similarity_search/include -Itensorflow -I/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-5_h1zjfb/nmslib_c6d5eb6b9f49403b83ca318a0891d032/.eggs/pybind11-2.6.1-py3.9.egg/pybind11/include -I/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-5_h1zjfb/nmslib_c6d5eb6b9f49403b83ca318a0891d032/.eggs/pybind11-2.6.1-py3.9.egg/pybind11/include -I/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-5_h1zjfb/nmslib_c6d5eb6b9f49403b83ca318a0891d032/.eggs/pybind11-2.6.1-py3.9.egg/pybind11/include -I/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-5_h1zjfb/nmslib_c6d5eb6b9f49403b83ca318a0891d032/.eggs/pybind11-2.6.1-py3.9.egg/pybind11/include -I/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/numpy/core/include -I/Users/briang/opt/anaconda3/envs/scispacy/include/python3.9 -c ./similarity_search/src/distcomp_bregman.cc -o build/temp.macosx-11.1-arm64-cpython-39/./similarity_search/src/distcomp_bregman.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO=\"2.1.1\" -std=c++14 -fvisibility=hidden clang: error: the clang compiler does not support '-march=native' error: command '/usr/bin/clang' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for nmslib Running setup.py clean for nmslib Failed to build nmslib Installing collected packages: wasabi, cymem, typer, spacy-loggers, spacy-legacy, pysbd, pydantic, pybind11, murmurhash, langcodes, conllu, catalogue, blis, srsly, preshed, pathy, nmslib, confection, thinc, spacy, scispacy Running setup.py install for nmslib ... error error: subprocess-exited-with-error

× Running setup.py install for nmslib did not run successfully. │ exit code: 1 ╰─> [22 lines of output] 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'"] /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running install /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_ext clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include/python3.9 -c /var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmpseejg0ue.cpp -o var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmpseejg0ue.o -std=c++14 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include/python3.9 -c /var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmp6g7syyfx.cpp -o var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/tmp6g7syyfx.o -fvisibility=hidden Extra compilation arguments: ['-O3', '-march=native', '-stdlib=libc++', '-mmacosx-version-min=10.7', '-DVERSION_INFO="2.1.1"', '-std=c++14', '-fvisibility=hidden'] building 'nmslib' extension creating build creating build/temp.macosx-11.1-arm64-cpython-39 creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search/src creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search/src/method creating build/temp.macosx-11.1-arm64-cpython-39/similarity_search/src/space creating build/temp.macosx-11.1-arm64-cpython-39/tensorflow clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I/Users/briang/opt/anaconda3/envs/scispacy/include -fPIC -O2 -isystem /Users/briang/opt/anaconda3/envs/scispacy/include -arch arm64 -I./similarity_search/include -Itensorflow -I/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pybind11/include -I/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pybind11/include -I/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pybind11/include -I/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pybind11/include -I/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/numpy/core/include -I/Users/briang/opt/anaconda3/envs/scispacy/include/python3.9 -c ./similarity_search/src/distcomp_bregman.cc -o build/temp.macosx-11.1-arm64-cpython-39/./similarity_search/src/distcomp_bregman.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO=\"2.1.1\" -std=c++14 -fvisibility=hidden clang: error: the clang compiler does not support '-march=native' error: command '/usr/bin/clang' failed with exit code 1 [end of output]

dakinggg commented 1 year ago

Hey, sorry, the part of the readme that says to use python 3.6 is woefully out of date. I'll fix that. scispacy should work with the newer versions of python. That being said, installing nmslib has always been the hardest part of installing scispacy. I recommend you try to just install nmslib and see if you can get that to work. I was just able to install nmslib in a python 3.9 environment on an m1 Mac with CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib (see this issue https://github.com/nmslib/nmslib/issues/476), and then install scispacy after that.

briangriner commented 1 year ago

Thanks for your reply Daniel. I tried to create a conda environment and install nmslib using the CFLAGS statement and pip install from the cmd line but got an error message about pip? One thing I did not mention before is that my OS is Ventura (macOS13) and I have lockdown mode turned on. Hasn't been an issue with other python libs but maybe there are some dependencies in scispacy that could be affected?

I look forward to any updates in scispacy and will surely try again to install.

Best regards, Brian


From: Daniel King @.> Sent: Sunday, November 6, 2022 12:12 AM To: allenai/scispacy @.> Cc: Brian Griner, PhD @.>; Author @.> Subject: Re: [allenai/scispacy] nmslib install error using a conda env on mac m1 (Issue #455)

Hey, sorry, the part of the readme that says to use python 3.6 is woefully out of date. I'll fix that. scispacy should work with the newer versions of python. That being said, installing nmslib has always been the hardest part of installing scispacy. I recommend you try to just install nmslib and see if you can get that to work. I was just able to install nmslib in a python 3.9 environment with CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib (see this issue nmslib/nmslib#476https://github.com/nmslib/nmslib/issues/476), and then install scispacy after that.

— Reply to this email directly, view it on GitHubhttps://github.com/allenai/scispacy/issues/455#issuecomment-1304710919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIIB7TMYF4O7YNR4KOLJELDWG4VZFANCNFSM6AAAAAARYG27ME. You are receiving this because you authored the thread.Message ID: @.***>

dakinggg commented 1 year ago

What was the error you got?

briangriner commented 1 year ago

Hi Daniel,

I tried to install nmslib again in a new py 3.9 environment and it looks like it actually did install but there were issues. The entire log from the install is below.

I also successfully installed scispacy from pip which is great! I included the install log for scispacy below the log for nmslib. Maybe I did something wrong before when I created the env for scispacy?

I will be testing it soon and will let you know if anything else comes up.

Thank you for following up with me on this.

Cheers, Brian

create env log

(base) @.*** ~ % conda create -n scispacy python=3.9

Collecting package metadata (current_repodata.json): done

Solving environment: done

Package Plan

environment location: /Users/briang/opt/anaconda3/envs/scispacy

added / updated specs:

- python=3.9

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/osx-arm64::ca-certificates-2022.10.11-hca03da5_0 None

certifi pkgs/main/osx-arm64::certifi-2022.9.24-py39hca03da5_0 None

libcxx pkgs/main/osx-arm64::libcxx-14.0.6-h848a8c0_0 None

libffi pkgs/main/osx-arm64::libffi-3.4.2-hc377ac9_4 None

ncurses pkgs/main/osx-arm64::ncurses-6.3-h1a28f6b_3 None

openssl pkgs/main/osx-arm64::openssl-1.1.1s-h1a28f6b_0 None

pip pkgs/main/osx-arm64::pip-22.2.2-py39hca03da5_0 None

python pkgs/main/osx-arm64::python-3.9.13-hbdb9e5c_2 None

readline pkgs/main/osx-arm64::readline-8.2-h1a28f6b_0 None

setuptools pkgs/main/osx-arm64::setuptools-65.5.0-py39hca03da5_0 None

sqlite pkgs/main/osx-arm64::sqlite-3.39.3-h1058600_0 None

tk pkgs/main/osx-arm64::tk-8.6.12-hb8d0fd4_0 None

tzdata pkgs/main/noarch::tzdata-2022f-h04d1e81_0 None

wheel pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0 None

xz pkgs/main/osx-arm64::xz-5.2.6-h1a28f6b_0 None

zlib pkgs/main/osx-arm64::zlib-1.2.13-h5a0b063_0 None

Proceed ([y]/n)? y

Preparing transaction: done

Verifying transaction: done

Executing transaction: done

#

To activate this environment, use

#

$ conda activate scispacy

#

To deactivate an active environment, use

#

$ conda deactivate

Retrieving notices: ...working... done

install nmslib log

(base) @.*** ~ % conda activate scispacy

(scispacy) @.*** ~ % CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib

Collecting nmslib

Using cached nmslib-2.1.1.tar.gz (188 kB)

Preparing metadata (setup.py) ... done

Collecting pybind11<2.6.2

Using cached pybind11-2.6.1-py2.py3-none-any.whl (188 kB)

Collecting psutil

Using cached psutil-5.9.4-cp38-abi3-macosx_11_0_arm64.whl (244 kB)

Collecting numpy>=1.10.0

Using cached numpy-1.23.4-cp39-cp39-macosx_11_0_arm64.whl (13.4 MB)

Building wheels for collected packages: nmslib

Building wheel for nmslib (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.

│ exit code: 1

╰─> [33 lines of output]

  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'"]

  /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead

    warnings.warn(

  /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.

    warnings.warn(

  Traceback (most recent call last):

    File "<string>", line 2, in <module>

    File "<pip-setuptools-caller>", line 34, in <module>

    File "/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-ov_6b84v/nmslib_1602d4079c614d059176fdb0892700e3/setup.py", line 170, in <module>

      setup(

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/__init__.py", line 86, in setup

      _install_setup_requires(attrs)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires

      dist.fetch_build_eggs(dist.setup_requires)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs

      resolved_dists = pkg_resources.working_set.resolve(

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pkg_resources/__init__.py", line 789, in resolve

      dist = best[req.key] = env.best_match(

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1075, in best_match

      return self.obtain(req, installer)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1087, in obtain

      return installer(requirement)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py", line 945, in fetch_build_egg

      return fetch_build_egg(self, req)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/installer.py", line 87, in fetch_build_egg

      wheel.install_as_egg(dist_location)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/wheel.py", line 110, in install_as_egg

      self._install_as_egg(destination_eggdir, zf)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/wheel.py", line 118, in _install_as_egg

      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/wheel.py", line 162, in _convert_metadata

      os.rename(dist_info, egg_info)

  OSError: [Errno 66] Directory not empty: '/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-ov_6b84v/nmslib_1602d4079c614d059176fdb0892700e3/.eggs/numpy-1.23.4-py3.9-macosx-11.1-arm64.egg/numpy-1.23.4.dist-info' -> '/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-ov_6b84v/nmslib_1602d4079c614d059176fdb0892700e3/.eggs/numpy-1.23.4-py3.9-macosx-11.1-arm64.egg/EGG-INFO'

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for nmslib

Running setup.py clean for nmslib

error: subprocess-exited-with-error

× python setup.py clean did not run successfully.

│ exit code: 1

╰─> [33 lines of output]

  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'"]

  /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead

    warnings.warn(

  /Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.

    warnings.warn(

  Traceback (most recent call last):

    File "<string>", line 2, in <module>

    File "<pip-setuptools-caller>", line 34, in <module>

    File "/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-ov_6b84v/nmslib_1602d4079c614d059176fdb0892700e3/setup.py", line 170, in <module>

      setup(

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/__init__.py", line 86, in setup

      _install_setup_requires(attrs)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires

      dist.fetch_build_eggs(dist.setup_requires)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs

      resolved_dists = pkg_resources.working_set.resolve(

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pkg_resources/__init__.py", line 789, in resolve

      dist = best[req.key] = env.best_match(

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1075, in best_match

      return self.obtain(req, installer)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1087, in obtain

      return installer(requirement)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/dist.py", line 945, in fetch_build_egg

      return fetch_build_egg(self, req)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/installer.py", line 87, in fetch_build_egg

      wheel.install_as_egg(dist_location)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/wheel.py", line 110, in install_as_egg

      self._install_as_egg(destination_eggdir, zf)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/wheel.py", line 118, in _install_as_egg

      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)

    File "/Users/briang/opt/anaconda3/envs/scispacy/lib/python3.9/site-packages/setuptools/wheel.py", line 162, in _convert_metadata

      os.rename(dist_info, egg_info)

  OSError: [Errno 66] Directory not empty: '/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-ov_6b84v/nmslib_1602d4079c614d059176fdb0892700e3/.eggs/numpy-1.23.4-py3.9-macosx-11.1-arm64.egg/numpy-1.23.4.dist-info' -> '/private/var/folders/1c/1wcfh1095clg_2ppxfmm2_fc0000gn/T/pip-install-ov_6b84v/nmslib_1602d4079c614d059176fdb0892700e3/.eggs/numpy-1.23.4-py3.9-macosx-11.1-arm64.egg/EGG-INFO'

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed cleaning build dir for nmslib

Failed to build nmslib

Installing collected packages: pybind11, psutil, numpy, nmslib

Running setup.py install for nmslib ... done

DEPRECATION: nmslib was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. Discussion can be found at https://github.com/pypa/pip/issues/8368

Successfully installed nmslib-2.1.1 numpy-1.23.4 psutil-5.9.4 pybind11-2.6.1

install scispacy log

(scispacy) @.*** ~ % pip install scispacy

Collecting scispacy

Using cached scispacy-0.5.1-py3-none-any.whl (44 kB)

Collecting scikit-learn>=0.20.3

Using cached scikit_learn-1.1.3-cp39-cp39-macosx_12_0_arm64.whl (7.7 MB)

Collecting joblib

Using cached joblib-1.2.0-py3-none-any.whl (297 kB)

Requirement already satisfied: numpy in ./opt/anaconda3/envs/scispacy/lib/python3.9/site-packages (from scispacy) (1.23.4)

Requirement already satisfied: nmslib>=1.7.3.6 in ./opt/anaconda3/envs/scispacy/lib/python3.9/site-packages (from scispacy) (2.1.1)

Collecting spacy<3.5.0,>=3.4.0

Using cached spacy-3.4.2-cp39-cp39-macosx_11_0_arm64.whl (6.5 MB)

Collecting pysbd

Using cached pysbd-0.3.4-py3-none-any.whl (71 kB)

Collecting conllu

Using cached conllu-4.5.2-py2.py3-none-any.whl (16 kB)

Collecting requests<3.0.0,>=2.0.0

Using cached requests-2.28.1-py3-none-any.whl (62 kB)

Requirement already satisfied: pybind11<2.6.2 in ./opt/anaconda3/envs/scispacy/lib/python3.9/site-packages (from nmslib>=1.7.3.6->scispacy) (2.6.1)

Requirement already satisfied: psutil in ./opt/anaconda3/envs/scispacy/lib/python3.9/site-packages (from nmslib>=1.7.3.6->scispacy) (5.9.4)

Requirement already satisfied: certifi>=2017.4.17 in ./opt/anaconda3/envs/scispacy/lib/python3.9/site-packages (from requests<3.0.0,>=2.0.0->scispacy) (2022.9.24)

Collecting urllib3<1.27,>=1.21.1

Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)

Collecting charset-normalizer<3,>=2

Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)

Collecting idna<4,>=2.5

Using cached idna-3.4-py3-none-any.whl (61 kB)

Collecting scipy>=1.3.2

Using cached scipy-1.9.3-cp39-cp39-macosx_12_0_arm64.whl (28.6 MB)

Collecting threadpoolctl>=2.0.0

Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)

Collecting thinc<8.2.0,>=8.1.0

Using cached thinc-8.1.5-cp39-cp39-macosx_11_0_arm64.whl (694 kB)

Collecting spacy-loggers<2.0.0,>=1.0.0

Using cached spacy_loggers-1.0.3-py3-none-any.whl (9.3 kB)

Collecting wasabi<1.1.0,>=0.9.1

Using cached wasabi-0.10.1-py3-none-any.whl (26 kB)

Collecting packaging>=20.0

Using cached packaging-21.3-py3-none-any.whl (40 kB)

Collecting tqdm<5.0.0,>=4.38.0

Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)

Collecting typer<0.5.0,>=0.3.0

Using cached typer-0.4.2-py3-none-any.whl (27 kB)

Collecting murmurhash<1.1.0,>=0.28.0

Using cached murmurhash-1.0.9-cp39-cp39-macosx_11_0_arm64.whl (19 kB)

Collecting jinja2

Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)

Requirement already satisfied: setuptools in ./opt/anaconda3/envs/scispacy/lib/python3.9/site-packages (from spacy<3.5.0,>=3.4.0->scispacy) (65.5.0)

Collecting preshed<3.1.0,>=3.0.2

Using cached preshed-3.0.8-cp39-cp39-macosx_11_0_arm64.whl (101 kB)

Collecting pathy>=0.3.5

Using cached pathy-0.6.2-py3-none-any.whl (42 kB)

Collecting langcodes<4.0.0,>=3.2.0

Using cached langcodes-3.3.0-py3-none-any.whl (181 kB)

Collecting spacy-legacy<3.1.0,>=3.0.10

Using cached spacy_legacy-3.0.10-py2.py3-none-any.whl (21 kB)

Collecting pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4

Using cached pydantic-1.10.2-cp39-cp39-macosx_11_0_arm64.whl (2.6 MB)

Collecting cymem<2.1.0,>=2.0.2

Using cached cymem-2.0.7-cp39-cp39-macosx_11_0_arm64.whl (31 kB)

Collecting catalogue<2.1.0,>=2.0.6

Using cached catalogue-2.0.8-py3-none-any.whl (17 kB)

Collecting srsly<3.0.0,>=2.4.3

Using cached srsly-2.4.5-cp39-cp39-macosx_11_0_arm64.whl (489 kB)

Collecting pyparsing!=3.0.5,>=2.0.2

Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)

Collecting smart-open<6.0.0,>=5.2.1

Using cached smart_open-5.2.1-py3-none-any.whl (58 kB)

Collecting typing-extensions>=4.1.0

Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)

Collecting confection<1.0.0,>=0.0.1

Using cached confection-0.0.3-py3-none-any.whl (32 kB)

Collecting blis<0.8.0,>=0.7.8

Using cached blis-0.7.9-cp39-cp39-macosx_11_0_arm64.whl (1.1 MB)

Collecting click<9.0.0,>=7.1.1

Using cached click-8.1.3-py3-none-any.whl (96 kB)

Collecting MarkupSafe>=2.0

Using cached MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl (17 kB)

Installing collected packages: wasabi, cymem, urllib3, typing-extensions, tqdm, threadpoolctl, spacy-loggers, spacy-legacy, smart-open, scipy, pysbd, pyparsing, murmurhash, MarkupSafe, langcodes, joblib, idna, conllu, click, charset-normalizer, catalogue, blis, typer, srsly, scikit-learn, requests, pydantic, preshed, packaging, jinja2, pathy, confection, thinc, spacy, scispacy

Successfully installed MarkupSafe-2.1.1 blis-0.7.9 catalogue-2.0.8 charset-normalizer-2.1.1 click-8.1.3 confection-0.0.3 conllu-4.5.2 cymem-2.0.7 idna-3.4 jinja2-3.1.2 joblib-1.2.0 langcodes-3.3.0 murmurhash-1.0.9 packaging-21.3 pathy-0.6.2 preshed-3.0.8 pydantic-1.10.2 pyparsing-3.0.9 pysbd-0.3.4 requests-2.28.1 scikit-learn-1.1.3 scipy-1.9.3 scispacy-0.5.1 smart-open-5.2.1 spacy-3.4.2 spacy-legacy-3.0.10 spacy-loggers-1.0.3 srsly-2.4.5 thinc-8.1.5 threadpoolctl-3.1.0 tqdm-4.64.1 typer-0.4.2 typing-extensions-4.4.0 urllib3-1.26.12 wasabi-0.10.1


From: Daniel King @.> Sent: Wednesday, November 9, 2022 7:12 PM To: allenai/scispacy @.> Cc: Brian Griner, PhD @.>; Author @.> Subject: Re: [allenai/scispacy] nmslib install error using a conda env on mac m1 (Issue #455)

What was the error you got?

— Reply to this email directly, view it on GitHubhttps://github.com/allenai/scispacy/issues/455#issuecomment-1309570650, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIIB7TJZCTFHCICGZWG47KTWHQ4WZANCNFSM6AAAAAARYG27ME. You are receiving this because you authored the thread.Message ID: @.***>

darebfh commented 1 year ago

Hey! I just ran into the same problem and managed to solve it as follows:

$conda create --name <env_name> python=3.8.11 # the lowest available python version in my case
$conda activate <env_name>
$CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib
$pip install scyspacy
briangriner commented 1 year ago

I just installed all the models and ran the examples and everything worked. Thanks for your help!