Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

python - 如何在python 3.7中使用pip安装wordcloud(How to install wordcloud using pip in python 3.7)

I have been trying to pip install wordcloud for python 3.7 on Windows 10 but I keep on getting this error message which I dont quite understand nor able to fix.

(我一直在尝试在Windows 10上为python 3.7 pip安装wordcloud,但我一直收到这个错误消息,我不太了解也无法修复。)

Running setup.py install for wordcloud : finished with status 'error'

(为wordcloud运行setup.py install:状态为“错误”)

 Complete output from command "c:program files (x86)python37-32python.exe" -u -c "import setuptools, tokenize;__file__='C:\Users\cs33~1\AppData\Local\Temp\pip-install-ome1vxvg\wordcloud\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:Userscs33~1AppDataLocalTemppip-record-cy5uj5zkinstall-record.txt --single-version-externally-managed --compile --user --prefix=:
    c:program files (x86)python37-32libdistutilsdist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    c:program files (x86)python37-32libdistutilsdist.py:274: UserWarning: Unknown distribution option: 'test_requires'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating buildlib.win32-3.7
    creating buildlib.win32-3.7wordcloud
    copying wordcloudcolor_from_image.py -> buildlib.win32-3.7wordcloud
    copying wordcloudokenization.py -> buildlib.win32-3.7wordcloud
    copying wordcloudwordcloud.py -> buildlib.win32-3.7wordcloud
    copying wordcloudwordcloud_cli.py -> buildlib.win32-3.7wordcloud
    copying wordcloud\_version.py -> buildlib.win32-3.7wordcloud
    copying wordcloud\__init__.py -> buildlib.win32-3.7wordcloud
    copying wordcloud\__main__.py -> buildlib.win32-3.7wordcloud
    copying wordcloudstopwords -> buildlib.win32-3.7wordcloud
    copying wordcloudDroidSansMono.ttf -> buildlib.win32-3.7wordcloud
    UPDATING buildlib.win32-3.7wordcloud/_version.py
    set buildlib.win32-3.7wordcloud/_version.py to '1.5.0'
    running build_ext
    building 'wordcloud.query_integral_image' extension
    creating buildemp.win32-3.7
    creating buildemp.win32-3.7Release
    creating buildemp.win32-3.7Releasewordcloud
    C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.15.26726inHostX86x86cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-Ic:program files (x86)python37-32include" "-Ic:program files (x86)python37-32include" "-IC:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.15.26726include" /Tcwordcloud/query_integral_image.c /Fobuildemp.win32-3.7Releasewordcloud/query_integral_image.obj
    query_integral_image.c
    c:program files (x86)python37-32includepyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\cl.exe' failed with exit status 2

I have tried downloading wordcloud-1.3.2-cp36-cp36m-win_amd64.whl and doing python --user pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl but i get is not a supported wheel on this platform wheel.

(我尝试下载wordcloud-1.3.2-cp36-cp36m-win_amd64.whl并执行python --user pip install wordcloud-1.3.2-cp36-cp36m-win_amd64.whl但我得到的不是该平台轮上的支持轮。)

Help would be appreciated.

(帮助将不胜感激。)

  ask by cs33 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Two points

(两点)

  • Make sure your .whl is in Scripts folder under python/python-version folder

    (确保您的.whl位于python / python-version文件夹下的Scripts文件夹中)

  • whl is correct version eg: if python 3.7 on 32 bit system whl should be library-cp37-cp37m-win32.whl

    (whl是正确的版本,例如:如果32位系统whl上的python 3.7应该是library-cp37-cp37m-win32.whl)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...