鱼C论坛

 找回密码
 立即注册
查看: 690|回复: 2

[已解决]pip安装wordcloud报错求解

[复制链接]
发表于 2021-8-16 23:21:20 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
错误信息如下
 ERROR: Command errored out with exit status 1:
     command: 'e:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Michael\\AppData\\Local\\Temp\\pip-install-neurk7o6\\wordcloud_4cc1f53532234d90a7f90dd19b7fdf74\\setup.py'"'"'; __file__='"'"'C:\\Users\\Michael\\AppData\\Local\\Temp\\pip-install-neurk7o6\\wordcloud_4cc1f53532234d90a7f90dd19b7fdf74\\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'"'"'))' install --record 'C:\Users\Michael\AppData\Local\Temp\pip-record-490m96uh\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\python\Include\wordcloud'
         cwd: C:\Users\Michael\AppData\Local\Temp\pip-install-neurk7o6\wordcloud_4cc1f53532234d90a7f90dd19b7fdf74\
    Complete output (70 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\_version.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\__init__.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\__main__.py -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
    copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
    UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
    set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
    running build_ext
    building 'wordcloud.query_integral_image' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Michael\AppData\Local\Temp\pip-install-neurk7o6\wordcloud_4cc1f53532234d90a7f90dd19b7fdf74\setup.py", line 9, in <module>
        setup(
      File "e:\python\lib\site-packages\setuptools\__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "e:\python\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "e:\python\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "e:\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "e:\python\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "e:\python\lib\distutils\command\install.py", line 546, in run
        self.run_command('build')
      File "e:\python\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "e:\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "e:\python\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "e:\python\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "e:\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "e:\python\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
        _build_ext.run(self)
      File "e:\python\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "e:\python\lib\distutils\command\build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "e:\python\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "e:\python\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
        _build_ext.build_extension(self, ext)
      File "e:\python\lib\distutils\command\build_ext.py", line 529, in build_extension
        objects = self.compiler.compile(sources,
      File "e:\python\lib\distutils\_msvccompiler.py", line 323, in compile
        self.initialize()
      File "e:\python\lib\distutils\_msvccompiler.py", line 220, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "e:\python\lib\site-packages\setuptools\msvc.py", line 313, in msvc14_get_vc_env
        return _msvc14_get_vc_env(plat_spec)
      File "e:\python\lib\site-packages\setuptools\msvc.py", line 265, in _msvc14_get_vc_env
        vcvarsall, vcruntime = _msvc14_find_vcvarsall(plat_spec)
      File "e:\python\lib\site-packages\setuptools\msvc.py", line 220, in _msvc14_find_vcvarsall
        _, best_dir = _msvc14_find_vc2017()
      File "e:\python\lib\site-packages\setuptools\msvc.py", line 192, in _msvc14_find_vc2017
        path = subprocess.check_output([
    AttributeError: 'str' object has no attribute 'decode'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\python\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Michael\\AppData\\Local\\Temp\\pip-install-neurk7o6\\wordcloud_4cc1f53532234d90a7f90dd19b7fdf74\\setup.py'"'"'; __file__='"'"'C:\\Users\\Michael\\AppData\\Local\\Temp\\pip-install-neurk7o6\\wordcloud_4cc1f53532234d90a7f90dd19b7fdf74\\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'"'"'))' install --record 'C:\Users\Michael\AppData\Local\Temp\pip-record-490m96uh\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\python\Include\wordcloud' Check the logs for full command output

现在用的版本是Python3.9
pip也已经升级到最新的版本了
不管是安装whl还是直接pip都报错,实在是没办法了,求解大佬们
最佳答案
2021-8-18 20:42:06
"e:\python\lib\site-packages\setuptools\msvc.py" 第192有问题
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-16 23:22:27 | 显示全部楼层

                               
登录/注册后可看大图

报错图片
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-8-18 20:42:06 | 显示全部楼层    本楼为最佳答案   
"e:\python\lib\site-packages\setuptools\msvc.py" 第192有问题
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-13 16:57

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表