鱼C论坛

 找回密码
 立即注册
查看: 992|回复: 1

[已解决]pip安装问题

[复制链接]
发表于 2020-12-15 19:25:22 | 显示全部楼层 |阅读模式

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

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

x
命令:pip install wordcloud
结果:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting wordcloud
  Using cached https://pypi.tuna.tsinghua.edu.c ... dcloud-1.8.1.tar.gz (220 kB)
Requirement already satisfied: numpy>=1.6.1 in d:\python3.9\lib\site-packages (from wordcloud) (1.19.4)
Requirement already satisfied: pillow in d:\python3.9\lib\site-packages (from wordcloud) (8.0.1)
Requirement already satisfied: matplotlib in d:\python3.9\lib\site-packages (from wordcloud) (3.3.3)
Requirement already satisfied: cycler>=0.10 in d:\python3.9\lib\site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\python3.9\lib\site-packages (from matplotlib->wordcloud) (1.3.1)
Requirement already satisfied: python-dateutil>=2.1 in d:\python3.9\lib\site-packages (from matplotlib->wordcloud) (2.8.1)
Requirement already satisfied: numpy>=1.6.1 in d:\python3.9\lib\site-packages (from wordcloud) (1.19.4)
Requirement already satisfied: pillow in d:\python3.9\lib\site-packages (from wordcloud) (8.0.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in d:\python3.9\lib\site-packages (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: six in c:\users\davy\appdata\roaming\python\python39\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.15.0)
Requirement already satisfied: six in c:\users\davy\appdata\roaming\python\python39\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.15.0)
Building wheels for collected packages: wordcloud
  Building wheel for wordcloud (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\python3.9\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Davy\\AppData\\Local\\Temp\\pip-install-olyl7fn6\\wordcloud_eb60f9b582c848898d9aac3940bb7367\\setup.py'"'"'; __file__='"'"'C:\\Users\\Davy\\AppData\\Local\\Temp\\pip-install-olyl7fn6\\wordcloud_eb60f9b582c848898d9aac3940bb7367\\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\Davy\AppData\Local\Temp\pip-wheel-vdvogu8s'
       cwd: C:\Users\Davy\AppData\Local\Temp\pip-install-olyl7fn6\wordcloud_eb60f9b582c848898d9aac3940bb7367\
  Complete output (20 lines):
  running bdist_wheel
  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
  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 wordcloud
  Running setup.py clean for wordcloud
Failed to build wordcloud
Installing collected packages: wordcloud
    Running setup.py install for wordcloud ... error
    ERROR: Command errored out with exit status 1:
     command: 'd:\python3.9\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Davy\\AppData\\Local\\Temp\\pip-install-olyl7fn6\\wordcloud_eb60f9b582c848898d9aac3940bb7367\\setup.py'"'"'; __file__='"'"'C:\\Users\\Davy\\AppData\\Local\\Temp\\pip-install-olyl7fn6\\wordcloud_eb60f9b582c848898d9aac3940bb7367\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Davy\AppData\Local\Temp\pip-record-jd5d8uci\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python3.9\Include\wordcloud'
         cwd: C:\Users\Davy\AppData\Local\Temp\pip-install-olyl7fn6\wordcloud_eb60f9b582c848898d9aac3940bb7367\
    Complete output (20 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
    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: Command errored out with exit status 1: 'd:\python3.9\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Davy\\AppData\\Local\\Temp\\pip-install-olyl7fn6\\wordcloud_eb60f9b582c848898d9aac3940bb7367\\setup.py'"'"'; __file__='"'"'C:\\Users\\Davy\\AppData\\Local\\Temp\\pip-install-olyl7fn6\\wordcloud_eb60f9b582c848898d9aac3940bb7367\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Davy\AppData\Local\Temp\pip-record-jd5d8uci\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python3.9\Include\wordcloud' Check the logs for full command output.
最佳答案
2020-12-15 19:37:27
本帖最后由 hrp 于 2020-12-15 19:39 编辑

两种办法,选其一:
1.去http://www.lfd.uci.edu/~gohlke/pythonlibs/下载已编译好的模块,用pip 文件名  本地安装
2.安装visualstudio 2019并在其中启用c++工作负载,完成后再尝试重新pip安装该模块
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-12-15 19:37:27 From FishC Mobile | 显示全部楼层    本楼为最佳答案   
本帖最后由 hrp 于 2020-12-15 19:39 编辑

两种办法,选其一:
1.去http://www.lfd.uci.edu/~gohlke/pythonlibs/下载已编译好的模块,用pip 文件名  本地安装
2.安装visualstudio 2019并在其中启用c++工作负载,完成后再尝试重新pip安装该模块
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 1 反对 0

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-17 01:15

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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