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

查看:195
本文介绍了无法在苹果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:

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天全站免登陆