简体   繁体   English

在Windows中python命令pip安装枕头出现错误

[英]python command pip install pillow in windows getting error

building 'PIL._imaging' extension
  error: [WinError 2] The system cannot find the file specified

  ----------------------------------------
  Failed building wheel for Pillow
Failed to build Pillow
Installing collected packages: Pillow
  Running setup.py install for Pillow
    Complete output from command c:\users\anilkumar.vandrangi\desktop\aspire\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\ANILKU~1.VAN\\AppData\\Local\\Temp\\pip-build-tr4denzb\\Pil
low\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\ANILKU~1.VAN\AppData\Local\Temp\pip-7zffvlgz-record\in
stall-record.txt --single-version-externally-managed --compile:
    Single threaded build, not installing mp_compile: 4 processes
    running install
    running build
    running build_py
    running egg_info
    writing top-level names to Pillow.egg-info\top_level.txt
    writing Pillow.egg-info\PKG-INFO
    writing dependency_links to Pillow.egg-info\dependency_links.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'Pillow.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'Pillow.egg-info\SOURCES.txt'
    running build_ext
    building 'PIL._imaging' extension
    error: [WinError 2] The system cannot find the file specified

    ----------------------------------------
Command "c:\users\anilkumar.vandrangi\desktop\aspire\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\ANILKU~1.VAN\\AppData\\Local\\Temp\\pip-build-tr4denzb\\Pillow\\setup.py';exec(comp
ile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\ANILKU~1.VAN\AppData\Local\Temp\pip-7zffvlgz-record\install-record.txt --singl
e-version-externally-managed --compile" failed with error code 1 in C:\Users\ANILKU~1.VAN\AppData\Local\Temp\pip-build-tr4denzb\Pillow

I'm assuming that you have are on x64 bit Windows. 我假设您使用的是x64位Windows。

The cleanes way to solve it: If you have installed 32 bit version of python: uninstall it install 64 bit During setup choose to add python to path Download 64 bit version of pillow: http://wp.stolaf.edu/it/installing-pil-pillow-cimage-on-windows-and-mac/ Run the setup file. 解决该问题的干净方法:如果已安装32位版本的python:卸载它,则安装64位在安装过程中,选择将python添加到路径中。下载64位版本的枕头: http : //wp.stolaf.edu/it/installing -pil-pillow-cimage-on-windows-and-mac /运行安装文件。

Check your Pip version to see if you have the last version available. 检查您的Pip版本以查看是否有最新版本。

C:\ python3 -m pip install --version

You can either use python or python3, I used python3 because I have 2.7 and 3.5 on the same disk. 您可以使用python或python3,我使用python3是因为我在同一磁盘上有2.7和3.5。

If your version is not the latest update with: 如果您的版本不是最新的更新:

C:\ python3 -m pip install --upgrade pip

Then now try pip install Pillow again: 然后,现在再次尝试pip install Pillow

C:\ python3 -m pip install Pillow

This time it has to work without problems. 这次必须正常工作。

You're getting this error because the pillow version you're trying to install is incompatible with your python version. 您收到此错误是因为您要安装的枕头版本与python版本不兼容。

Try upgrading both as a final resort. 最后都尝试升级两者。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM