python-安装pip

来源:互联网 发布:excel拆分合并软件 编辑:程序博客网 时间:2024/06/05 08:29

1.cmd安装pip

背景:

   在win7安装的python2.7和3.6两个版本,在cmd写pip测试报错:

                                 cmd下pip出现Fatal error in launcher: Unable to create process using '"'

解决步骤:

a.在path下配置环境,分别配置pip.exe所在目录路径

b.因为多版本pip因此在使用时,需要标识python版本:python27.exe -m pip,测试通过

2.pycharm使用pip

pytharm下安装模块步骤setting->project->+

pycharm安装模块pil报错non-zero exit code(1)

Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'D:\python\python2.7\python27.exe'.

Collecting pil


  The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host pypi.douban.com'.
  Could not find a version that satisfies the requirement pil (from versions: )
No matching distribution found for pil

a.修改manage repositories,添加国内信任源


b.添加--trusted-host pypi.douban.com

重新安装仍未成功,最后查找发现pillow与pil用法相同,查找安装成功。


原创粉丝点击