Pillow安装出错

安装环境:win7 64 但是我的python是32bit

>>错误:

C:\Users\XS>cd E:\Study_project_all\Python_study\pyQt4_GUI\rj
C:\Users\XS>pip install Pillow-2.7.0-cp27-none-win_amd64.whl

=============================报错=========================================
Requirement 'Pillow-2.7.0-cp27-none-win_amd64.whl' looks like a filename, but th
e file does not exist
Pillow-2.7.0-cp27-none-win_amd64.whl is not a supported wheel on this platform.

>>后来改用32bit

C:\Users\XS>pip install Pillow-4.3.0-cp27-cp27m-win32.whl

===========================报错==========================================
Requirement 'Pillow-4.3.0-cp27-cp27m-win32.whl' looks like a filename, but the f
ile does not exist
Processing c:\users\xs\pillow-4.3.0-cp27-cp27m-win32.whl
Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "c:\python27\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_
files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 620, in _prepare
_file
    session=self.session, hashes=hashes)
  File "c:\python27\lib\site-packages\pip\download.py", line 809, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "c:\python27\lib\site-packages\pip\download.py", line 715, in unpack_file
_url
    unpack_file(from_path, location, content_type, link)
  File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 599, in unpac
k_file
    flatten=not filename.endswith('.whl')
  File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 482, in unzip
_file
    zipfp = open(filename, 'rb')
IOError: [Errno 2] No such file or directory: 'C:\\Users\\XS\\Pillow-4.3.0-cp27-
cp27m-win32.whl'

>>终于找到原因!是因为路径没有切换成功!!!路径没设置对

路径是安装包Pillow-4.3.0-cp27-cp27m-win32.whl
应该先
C:\Users\XS>e:
E:\>cd E:\Study_project_all\Python_study\pyQt4_GUI\rj
E:\Study_project_all\Python_study\pyQt4_GUI\rj>pip install Pillow-4.3.0-cp27-cp27m-win32.whl
=============================正确==================================================
Processing e:\study_project_all\python_study\pyqt4_gui\rj\pillow-4.3.0-cp27-cp27
m-win32.whl
Requirement already satisfied: olefile in c:\python27\lib\site-packages (from Pi
llow==4.3.0)
Installing collected packages: Pillow
  Found existing installation: Pillow 4.0.0
    Uninstalling Pillow-4.0.0:
      Successfully uninstalled Pillow-4.0.0
Successfully installed Pillow-4.3.0

>>检测是否安装成功

在cmd中输入以下命令

C:\Users\XS>python
=======================================================================
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip; print(pip.pep425tags.get_supported())
===============================================================================
[('cp27', 'cp27m', 'win32'), ('cp27', 'none', 'win32'), ('py2', 'none', 'win32')
, ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py
2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', '
none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none'
, 'any'), ('py20', 'none', 'any')]









你可能感兴趣的:(python)