episode

episode

0个粉丝

1

问答

0

专栏

0

资料

episode  发布于  2023-11-15 09:52:28
采纳率 0%
1个问答
137

amct安装包import报错

悬赏金¥ 10
已结题
     

完全按照文档步骤安装,之前安装cann toolkit时都没有问题。
报错安装指令

pip3.7.5 install amct_pytorch-0.9.0-py3-none-linux_x86_64.tar.gz --user

会报错没有torch包,然后我修改了setup.py的开头方便定位问题,仍然是import报错
修改的setup.py开头

#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Copyright (C) 2019. Shenshu Technologies Co., Ltd. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the Apache License Version 2.0.You may not use
this file except in compliance with the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Apache License for more details at
http://www.apache.org/licenses/LICENSE-2.0

package script.

"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os
import sys
import numpy
sys.exit()

报错信息

Processing ./amct_pytorch-0.9.0-py3-none-linux_x86_64.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "/home/haitu/.local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/haitu/.local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/haitu/.local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-8pqwl1gw/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-8pqwl1gw/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-8pqwl1gw/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 488, in run_setup
          self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-8pqwl1gw/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 26, in <module>
      ModuleNotFoundError: No module named 'numpy'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

如果解压安装包,直接运行python3 setup.py install或者./setup.py等就可以import,但是也无法安装会出现更多其他问题。。。所以还是先解决导入问题

我来回答
回答
2个
时间排序
时间排序
认可量排序
认可量排序
0 条记录 第 0 /

Markdown 语法

  • 加粗 **内容**
  • 斜体 *内容*
  • 删除线 ~~内容~~
  • 引用 > 引用内容
  • 代码 `代码`
  • 代码块 ```编程语言↵代码```
  • 链接 [链接标题](url)
  • 无序列表 - 内容
  • 有序列表 1. 内容
  • 缩进 内容
  • 图片 ![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗 **内容**
  • 斜体 *内容*
  • 删除线 ~~内容~~
  • 引用 > 引用内容
  • 代码 `代码`
  • 代码块 ```编程语言↵代码```
  • 链接 [链接标题](url)
  • 无序列表 - 内容
  • 有序列表 1. 内容
  • 缩进 内容
  • 图片 ![alt](url)
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

Loading...
易百纳技术社区
确定要删除此文章、专栏、评论吗?
确定
取消
易百纳技术社区
每周任务
    去完成
    活动规则
    易百纳技术社区
    升级提醒
    升级

    恭喜您的社区称号由 升级为 “社区游民”

    同时为了感谢您对社区的支持,我们将送出xxx礼品一份, 记得领取哦~

    升级提醒
    易百纳技术社区

    惊喜礼包

    拼手气红包 红包规则
    祝福语
    恭喜发财,大吉大利!
    红包金额
    红包最小金额不能低于5元
    红包数量
    红包数量范围10~50个
    余额支付
    当前余额:
    可前往问答、专栏板块获取收益 去获取
    取 消 确 定

    小包子的红包

    恭喜发财,大吉大利

    已领取20/40,共1.6元 红包规则

      avatar