python 如何在windows上pip安装pycocotools

eivnm1vs  于 2022-12-25  发布在  Python
关注(0)|答案(1)|浏览(138)

这是错误说我不知道如何解决这个问题

Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\Administrator\anaconda3\envs\tensorflow\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-req-build-tnq87rc_\\PythonAPI\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-req-build-tnq87rc_\\PythonAPI\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-qvgaj51h'
       cwd: C:\Users\Administrator\AppData\Local\Temp\pip-req-build-tnq87rc_\PythonAPI
 ERROR: Failed building wheel for pycocotools
  Running setup.py clean for pycocotools
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\Administrator\anaconda3\envs\tensorflow\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-req-build-tnq87rc_\\PythonAPI\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-req-build-tnq87rc_\\PythonAPI\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: C:\Users\Administrator\AppData\Local\Temp\pip-req-build-tnq87rc
lf5gs5x2

lf5gs5x21#

在windows中使用pycocotools有很多错误。我没有在Windows中安装。在Linux下有任何问题。原始函数用C编写。一些函数可以用Python重写。我用解码掩码做了。https://github.com/armengot/test_coco_api/blob/main/python/forkcocowin.py

相关问题