无法在苹果 M1 上安装 gensim [英] can't install gensim on apple M1

查看:99
本文介绍了无法在苹果 M1 上安装 gensim的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 python gensim 模块,但出现错误.

I am trying to install python gensim module but getting errors.

 Running from numpy source directory.
      /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
        warnings.warn(msg)
      error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-10.14.6-arm64-3.8/numpy/core/src/umath -Ibuild/src.macosx-10.14.6-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-10.14.6-arm64-3.8/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.14.6-arm64-3.8/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.14.6-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-10.14.6-arm64-3.8/numpy/core/src/npymath -c numpy/core/src/multiarray/buffer.c -o build/temp.macosx-10.14.6-arm64-3.8/numpy/core/src/multiarray/buffer.o -MMD -MF build/temp.macosx-10.14.6-arm64-3.8/numpy/core/src/multiarray/buffer.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for numpy
    ERROR: Failed to build one or more wheels

  distutils.errors.DistutilsError: Command '['/Library/Developer/CommandLineTools/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/5d/9599hjpx0tsbp22mcpdsqdc80000gn/T/tmp56vlhe_y', '--quiet', 'numpy>=1.11.3']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我不知道为什么它的建筑很笨

I am not sure why its building numpy

我使用这里提到的 conda miniforge 单独安装了 numpy:https://towardsdatascience.com/new-apple-silicon-m1-macbook-air-the-dream-laptop-for-machine-learning-engineers-a1590fbd170f

I installed numpy separately using the conda miniforge as mentioned here: https://towardsdatascience.com/new-apple-silicon-m1-macbook-air-the-dream-laptop-for-machine-learning-engineers-a1590fbd170f

如果有人在这方面有更多经验,可以提供帮助吗?

Can someone help if they have more experience with this?

推荐答案

通过使用 rosetta 在 mac 上运行终端来修复,因此不再有此问题.谢谢回复.

Fixed by running the terminal on mac using rosetta so no longer having this issue. Thanks for replying.

这篇关于无法在苹果 M1 上安装 gensim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆