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

from mxnet import np,报错提示error: legacy-install-failure× Encountered error while trying to install

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

from mxnet import np,报错提示error: legacy-install-failure× Encountered error while trying to install

1、pip install mxnet,失败,提示:

      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  WARNING: No metadata found in d:program files (x86)python3.9.4libsite-packages
  Rolling back uninstall of numpy
  Moving to d:program files (x86)python3.9.4libsite-packagesnumpy-1.22.3.dist-info
   from D:Program Files (x86)python3.9.4Libsite-packages~umpy-1.22.3.dist-info
  Moving to d:program files (x86)python3.9.4libsite-packagesnumpy
   from D:Program Files (x86)python3.9.4Libsite-packages~-mpy
  Moving to d:program files (x86)python3.9.4scriptsf2py.exe
   from C:UserslilinAppDataLocalTemppip-uninstall-a6sj89baf2py.exe
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> numpy

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -ip (d:program files (x86)python3.9.4libsite-packages)
WARNING: Ignoring invalid distribution -ip (d:program files (x86)python3.9.4libsite-packages)
WARNING: Ignoring invalid distribution -ip (d:program files (x86)python3.9.4libsite-packages)

2、尝试

(1)pip uninstall numpy,失败

(2)解决常见pip install错误方法;

https://www.youtube.com/watch?v=YVfvLYM2Yes&ab_channel=MustufaBaighttps://www.youtube.com/watch?v=YVfvLYM2Yes&ab_channel=MustufaBaig(3)采用手动下载mxnet文件,然后加载。

在mxnet文件本地路径下输入cmd,输入"pip install "

F:Download>pip install mxnet-1.9.0+mkl-cp39-cp39-win_amd64.whl

文件下载链接:手动搜索mxnet

https://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap 

遇到同类问题:

1、python - Gettingerror: legacy-install-failure, while installing basemap - Stack Overflow 

2、python - How to resolve the error of legacy-install-failure? - Stack Overflow 

其他链接:

mxnet-cu112 · PyPI

----------

安装mxnet后,运行之后再次报错:

FileNotFoundError: Could not find module 'D:Program Files (x86)python3.9.4libsite-packagesmxnetlibmxnet.dll' (or one of its dependencies). Try using the full path with constructor syntax.

暂时未解决,相同问题.

1、https://github.com/apache/incubator-mxnet/issues/17887

------------

附录:

1、

ModuleNotFoundError: No module named 'pip'
解决办法
python -m ensurepip
python -m pip install --upgrade pip

 

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

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

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