Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

arrayfire-python conflict with pycuda on anaconda with Linux

未关闭
#191 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
anaconda, linux, python

调研方向

该失败通过 arrayfire/tests/simple/array_test.py 和 arrayfire/tests/simple/_util.py 报告,格式化位于 arrayfire/array.py,错误处理位于 arrayfire/util.py。复现安装了 pycuda 的 Anaconda/Linux 环境,然后将其与 separate-PYTHONPATH 这一变通方案进行比较。当 simple 测试无需该变通方案即可通过,并且依赖项交互已记录或修复时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Hi,

I am using anaconda on linux, I have been previously using arrayfire on windows fine. I installed latest arrayfire on the Linux OS.. The error was

ERROR:root:Traceback (most recent call last):
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/tests/simple/_util.py", line 32, in run
    test(verbose)
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/tests/simple/array_test.py", line 26, in simple_array
    display_func(b)
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/tests/simple/_util.py", line 50, in print_func_impl
    _print_log += str(arg) + '\n'
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/array.py", line 1281, in __str__
    return self._get_metadata_str(dims=False) + self._as_str()
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/array.py", line 1301, in _as_str
    safe_call(be.af_array_to_string(c_pointer(arr_str), "", self.arr, 4, True))
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/util.py", line 79, in safe_call
    raise RuntimeError(to_str(err_str))
RuntimeError: In function void print(const char*, af_array, int, std::ostream&, bool) [with T = int; af_array = void*; std::ostream = std::basic_ostream<char>]
In file src/api/c/print.cpp:

After spending a day trying to think as to what the problem could be, I discovered that the problem is due to conflict with the install of pycuda, as soon as I removed pycuda, the arrayfire tests passed. The different version of pycuda give the same error.

Now I solved the issue by installing pycuda in a separate folder and adding that to the PYTHONPATH instead of the default in anaconda.

主要语言
Python
星标
422
派生
63
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

arrayfire/arrayfire-python 的其他 Issue

查看 arrayfire/arrayfire-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。