簡體   English   中英

Pycharm 不安裝庫 Pillow

[英]Pycharm doesn't install the library Pillow

我試圖在 IDE Pycharm 中為我的項目安裝包 Pillow,但是當我嘗試它時,控制台向我顯示了這個回溯。

writing src\Pillow.egg-info\PKG-INFO
    writing dependency_links to src\Pillow.egg-info\dependency_links.txt
    writing top-level names to src\Pillow.egg-info\top_level.txt
    reading manifest file 'src\Pillow.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.c'
    warning: no files found matching '*.h'
    warning: no files found matching '*.sh'
    warning: no previously-included files found matching '.appveyor.yml'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.codecov.yml'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'azure-pipelines.yml'
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    no previously-included directories found matching '.azure-pipelines'
    no previously-included directories found matching '.travis'
    writing manifest file 'src\Pillow.egg-info\SOURCES.txt'
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext


    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.

    Please see the install instructions at:
       https://pillow.readthedocs.io/en/latest/installation.html

    Traceback (most recent call last):
      File "C:\Users\DARWIN~1\AppData\Local\Temp\pycharm-packaging\Pillow\setup.py", line 852, in <module>
        setup(
      File "C:\Users\Darwin Lozada\PycharmProjects\LearningPython\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Darwin Lozada\PycharmProjects\LearningPython\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\install.py", line 61, in run
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\Darwin Lozada\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "C:\Users\DARWIN~1\AppData\Local\Temp\pycharm-packaging\Pillow\setup.py", line 687, in build_extensions
        raise RequiredDependencyException(f)
    __main__.RequiredDependencyException: zlib

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\DARWIN~1\AppData\Local\Temp\pycharm-packaging\Pillow\setup.py", line 907, in <module>
        raise RequiredDependencyException(msg)
    __main__.RequiredDependencyException:

    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.

    Please see the install instructions at:
       https://pillow.readthedocs.io/en/latest/installation.html



    ----------------------------------------

Command ""C:\Users\Darwin Lozada\PycharmProjects\LearningPython\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\DARWIN~1\\AppData\\Local\\Temp\\pycharm-packaging\\Pillow\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record "C:\Users\Darwin Lozada\AppData\Local\Temp\pip-record-nfkxoa_3\install-record.txt" --single-version-externally-managed --compile --install-headers "C:\Users\Darwin Lozada\PycharmProjects\LearningPython\venv\include\site\python3.8\Pillow"" failed with error code 1 in C:\Users\DARWIN~1\AppData\Local\Temp\pycharm-packaging\Pillow\

我不知道可能是什么問題。

我已經使用pip install Pillow但 Pycharm 無法識別它。 我讀了一些關於 venv 的內容,但事實是我不了解 jajaja 的幾件事。

更新

也許這是問題所在,顯然我安裝了 2 個 python 版本

也許這是問題所在,顯然我安裝了 2 個 python 版本

嘗試升級您的 pip 版本

python -m pip install -U --force-reinstall pip

來源

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM