栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

Mac 配置 spams- python2.6

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/889622.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号