首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Windows 10上安装tf-models-官方

在Windows 10上安装tf-models-官方
EN

Stack Overflow用户
提问于 2021-09-21 09:35:38
回答 1查看 412关注 0票数 0

我正在尝试在装有Windows10的PC上安装tf-models-Offical.

当我在命令提示符下运行pip install tf-models-official时,我得到以下错误

代码语言:javascript
复制
 Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\iavta\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iavta\\AppData\\Local\\Temp\\pip-install-0twx2hmy\\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\\setup.py'"'"'; __file__='"'"'C:\\Users\\iavta\\AppData\\Local\\Temp\\pip-install-0twx2hmy\\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\iavta\AppData\Local\Temp\pip-wheel-60i3880o'
       cwd: C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\__init__.py -> build\lib.win-amd64-3.8\pycocotools
  running build_ext
  cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
  C:\Users\iavta\anaconda3\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\pycocotools\_mask.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'pycocotools._mask' extension
  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/
  ----------------------------------------
  ERROR: Failed building wheel for pycocotools
  Running setup.py clean for pycocotools
Successfully built termcolor
Failed to build pycocotools

我已经做了pip install pycocotools-windows,并且在安装过程中没有任何问题,根据Vision Studio安装程序,我已经安装了Visual Studio2019版本16.11.3。所以,我不知道为什么他们问我要Microsoft Visual C++ 14.0 or greater

EN

回答 1

Stack Overflow用户

发布于 2021-11-30 07:31:48

我解决了windows 10 anaconda (python=3.9)上令人讨厌的“为pycocotools构建轮子失败”的问题,方法是:

  1. 卸载Visual Studio 2019;
  2. Uninstall all Visual C++ Redistributable (2015-2019、2013、2012等);
  3. 安装Visual Studio 2022,使用C++勾选桌面开发。
  4. 激活新的虚拟环境,并运行"pip install Desktop

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69266620

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档