python2.7装numpy_python-2.7 – 如何正确安装NumPy ufunc?

我试图从

SciPy Docs安装一个示例ufunc,但是当我运行python setup.py build或python setup.py install时,我得到一些关于弃用的NumPy API的警告.

当我运行python setup.py install时,这是输出:

$python setup.py install

running install

running build

running config_cc

unifing config_cc,config,build_clib,build_ext,build commands --compiler options

running config_fc

unifing config_fc,build commands --fcompileroptions

running build_src

build_src

building extension "npufunc_directory.npufunc" sources

build_src: building npy-pkg config files

running build_ext

customize UnixCCompiler

customize UnixCCompiler using build_ext

building 'npufunc_directory.npufunc' extension

compiling C sources

C compiler: gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.8-1.x86_64/build=/usr/src/debug/python-2.7.8-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.8-1.x86_64/src/Python-2.7.8=/usr/src/debug/python-2.7.8-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

creating build

creating build/temp.cygwin-1.7.32-x86_64-2.7

compile options: '-I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'

gcc: single_type_logit.c

In file included from /usr/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:0,from single_type_logit.c:3:

/usr/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: #warning "Using deprecated NumPy API,disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API,disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"

creating build/lib.cygwin-1.7.32-x86_64-2.7

creating build/lib.cygwin-1.7.32-x86_64-2.7/npufunc_directory

gcc -shared -Wl,--enable-auto-image-base -L. build/temp.cygwin-1.7.32-x86_64-2.7/single_type_logit.o -L/usr/lib/python2.7/config -L/usr/lib -lpython2.7 -o build/lib.cygwin-1.7.32-x86_64-2.7/npufunc_directory/npufunc.dll

running scons

running install_lib

copying build/lib.cygwin-1.7.32-x86_64-2.7/npufunc_directory/npufunc.dll -> /usr/lib/python2.7/site-packages/npufunc_directory

running install_egg_info

Removing /usr/lib/python2.7/site-packages/npufunc_directory-0.0.0-py2.7.egg-info

Writing /usr/lib/python2.7/site-packages/npufunc_directory-0.0.0-py2.7.egg-info

running install_clib

customize UnixCCompiler

运行python setup.py build会产生:

$python setup.py build

running build

running config_cc

unifing config_cc,build commands --fcompiler options

running build_src

build_src

building extension "npufunc_directory.npufunc" sources

build_src: building npy-pkg config files

running build_ext

customize UnixCCompiler

customize UnixCCompiler using build_ext

running scons

如果我尝试导入模块,我得到:

Traceback (most recent call last):

File "",line 1,in

import npufunc

ImportError: No module named npufunc

有谁知道如何使这项工作?

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值