Mac 配置 spams- python2.6

一 网址汇总

官网:SPAMS
在线文档:for python
GitHub:SPAMS-python

二 安装要求

  • 一个 C++ 现代编译器(使用 gcc >= 4.5 测试)
  1. 安装Xcode:App Store
  2. 安装 ARM 版 Homebrew
    直接执行:
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"

设置环境变量:终端输入:

echo $SHELL

通过结果,确定Mac使用zsh作为默认Shell,使用.zprofile,命令:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
  • 安装gcc:在终端
 brew install gcc

查看gcc版本:

gcc -v
  • 一个 BLAS/LAPACK 库(如 OpenBLAS、Intel MKL、Atlas)
  1. 安装OpenBLAS:在终端
brew install openblas

三 从 PyPI 安装:

标准安装使用 Numpy 使用的 BLAS 和 LAPACK 库:

pip install spams

四 测试:

From Python (assuming spams package is installed):

from spams.tests import test_spams

test_spams('-h')                    # print the man page
test_spams()                        # run all tests
test_spams(['sort', 'calcAAt'])     # run specific tests
test_spams(python_exec='python3')   # specify the python exec

Done.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值