为了账号安全,请及时绑定邮箱和手机立即绑定

无法 pip 安装手电筒

无法 pip 安装手电筒

哆啦的时光机 2023-06-06 14:40:37
我正在尝试pip install stanza并收到此消息:ERROR: No matching distribution found for torch>=1.3.0 (from stanza)然后我运行pip install torch并得到以下内容 ERROR: Command errored out with exit status 1:   command: 'c:\python\python37\python.exe' ... ...  ...  ...  Traceback (most recent call last):    ... ...    File "C:\Users\borka\AppData\Local\Temp\pip-install-10i7vgad\torch\setup.py", line 51, in run      from tools.nnwrap import generate_wrappers as generate_nn_wrappers  ModuleNotFoundError: No module named 'tools.nnwrap'  ----------------------------------------  ERROR: Failed building wheel for torch  ERROR: Command errored out with exit status 1:   command: 'c:\python\python37\python.exe' ... ...       cwd: C:\Users\borka\AppData\Local\Temp\pip-install-10i7vgad\torch  Complete output (2 lines):  running clean  error: [Errno 2] No such file or directory: '.gitignore'  ----------------------------------------  ERROR: Failed cleaning build dir for torchDEPRECATION: Could not build wheels for torch which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.    ERROR: Command errored out with exit status 1:     command: 'c:\python\python37\python.exe' ... ...    Traceback (most recent call last):    ... ...      File "C:\Users\borka\AppData\Local\Temp\pip-install-10i7vgad\torch\setup.py", line 51, in run        from tools.nnwrap import generate_wrappers as generate_nn_wrappers    ModuleNotFoundError: No module named 'tools.nnwrap'    ----------------------------------------ERROR: Command errored out with exit status 1: 'c:\python\python37\python.exe' ... ... Check the logs for full command output.
查看完整描述

2 回答

?
凤凰求蛊

TA贡献1825条经验 获得超4个赞

我可以看到你有一台 Windows 机器,所以从这个官方 pytorch网站,你可以构建最适合你的要求和系统的命令,试试这个

pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

在这里,所有的torch包都位于 Windows、MacOS 和 Linux 中


查看完整回答
反对 回复 2023-06-06
?
三国纷争

TA贡献1804条经验 获得超7个赞

我遇到了同样的错误,并意识到 Pytorch 尚不支持 Python 3.9。我使用 Python 3.7 创建了另一个虚拟环境并且安装成功。



查看完整回答
反对 回复 2023-06-06
  • 2 回答
  • 0 关注
  • 91 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信