首页 > 解决方案 > 如何在运行 Python 3.8 的 Pycharm 上安装 Pillow 7.0.0?

问题描述

我正在尝试使用 Django 并显示来自 Sql db 的图像,遵循此LinkedIn Learning tutorial

在运行 manage.py 来运行我的 django 开发服务器的过程中,我遇到了一个必须安装枕头的问题。

到目前为止,这个过程被证明是乏味的,以下是我尝试过的事情:

  1. 在 PyCharm 终端中运行"simple" python -m pip Pillow,然后得到:python -m pip Pillow --upgrade
    a required dependency when compiling Pillow from source.

    Please see the install instructions at:
       https://pillow.readthedocs.io/en/latest/installation.html
  1. (我拥有的 Pycharm Ultimate):运行发行说明中提供的 WSL 环境。这应该可以工作,因为我在 WSL 中安装了所需的先决条件。然而,我的电脑运行了很长一段时间的可怕的“骷髅”进程,而且我认为它不会很快结束。
  2. 尝试从 PyCharm GUI 安装也会以与 1 相同的方式失败。
  3. 尝试从https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow安装以下二进制文件,该文件在本主题的其他一些答案中被引用,在通过以下方式安装时会出现此错误pip install <wheel name here>

Pillow-7.0.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.

**pip3 也不起作用。提到虽然在我的 PyCharm virtualenv 中它们都指向同一个 python 解释器。乍一看...

我的主要问题是- 有没有人能够在 Windows 10 上为 PyCharm virtualenv 安装枕头 7.0.0?如果是这样,你是怎么做到的?这样我就可以回去学习了!先感谢您!

编辑:更新了(1)中采取的步骤。对于那个很抱歉

标签: pythonwindowspippycharm

解决方案


推荐阅读