1

我正在尝试在 pyzo2014a 上安装 PIL,但它给出了一个错误:

TypeError:__call__()缺少 1 个必需的位置参数:'name'"

这是完整的报告:

C:\pyzo2014a\lib\site-packages\pip\__main__.py run on 01/25/17 21:50:00
Downloading/unpacking pillow
Getting page https://pypi.python.org/simple/pillow/
URLs to search for versions for pillow:
* https://pypi.python.org/simple/pillow/
Analyzing links from page https://pypi.python.org/simple/pillow/
Skipping link  https://pypi.python.org/packages/00/15/e776f42afb6d79f27710aded08fd50998174f772621f1cda5d44701be1ed/Pillow-2.1.0-py2.6-win32.egg#md5=0a85404ffb50fff762615a47e6d363e9 (from https://pypi.python.org/simple/pillow/); unknown archive format: .egg

Ignoring link                https://pypi.python.org/packages/7b/11/1d49e73f946234604325f1aafdc2781d02963ea83d    cdceda595a62d978f0/Pillow-3.1.0.rc1.zip#md5=df5113cb2e0bc130f3aeb5c543829f18       (from https://pypi.python.org/simple/pillow/), version 3.1.0.rc1 is a pre-release     (use --pre to allow).
Ignoring link   https://pypi.python.org/packages/91/a8/8ea7bbf6e950531509063b08b30595940f8aef4969    becfdb2b81f2941b2d/Pillow-3.1.0- rc1.tar.gz#md5=e37ac34db7259c95b513939595ad1e7c (from  https://pypi.python.org/simple/pillow/), version 3.1.0-rc1 is a pre-release (use  --pre to allow).
Ignoring link  https://pypi.python.org/packages/99/c7/2b01d25cf2e66edd5fbcbf372dae68a9a079a17a14c6b6fadc5df69a930f/Pillow-3.1.0rc1-cp34-none-win_amd64.whl#md5=ff9da8cb052ff99bbf3b50a15d3cc7b4 (from https://pypi.python.org/simple/pillow/), version 3.1.0rc1 is a pre-release (use --pre to allow).
Using version 4.0.0 (newest of versions: 4.0.0, 3.4.2, 3.4.2, 3.4.1, 3.4.1, 3.4.0, 3.4.0, 3.3.3, 3.3.3, 3.3.2, 3.3.2, 3.3.1, 3.3.1, 3.3.0, 3.3.0, 3.2.0, 3.2.0, 3.2.0, 3.1.2, 3.1.2, 3.1.1, 3.1.1, 3.1.1, 3.1.0, 3.1.0, 3.1.0, 3.0.0, 3.0.0, 3.0.0, 2.9.0, 2.9.0, 2.9.0, 2.8.2, 2.8.2, 2.8.2, 2.8.1, 2.8.1, 2.8.1, 2.8.0, 2.8.0, 2.8.0, 2.7.0, 2.7.0, 2.7.0, 2.6.2, 2.6.2, 2.6.2, 2.6.1, 2.6.1, 2.6.1, 2.6.0, 2.6.0, 2.6.0, 2.5.3, 2.5.3, 2.5.2, 2.5.2, 2.5.1, 2.5.1, 2.5.0, 2.5.0, 2.4.0, 2.4.0, 2.3.2, 2.3.1, 2.3.0, 2.3.0, 2.2.2, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.0, 1.7.8, 1.7.7, 1.7.6, 1.7.6, 1.7.5, 1.7.4, 1.7.3, 1.7.2, 1.7.1, 1.7.0, 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, 1.0)
Downloading from URL  https://pypi.python.org/packages/8d/80/eca7a2d1a3c2dafb960f32f844d570de988e609f5fd17de92e1cf6a01b0a/Pillow-4.0.0.tar.gz#md5=d5af224b0fa2c66dacc9814785fef9e7 (from  https://pypi.python.org/simple/pillow/)
Cleaning up...
Removing temporary dir C:\Users\Acer\AppData\Local\Temp\pip_build_Acer...
Exception:
Traceback (most recent call last):
File "C:\pyzo2014a\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\pyzo2014a\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle,  bundle=self.bundle)
File "C:\pyzo2014a\lib\site-packages\pip\req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "C:\pyzo2014a\lib\site-packages\pip\req.py", line 292, in run_egg_info
logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name))
File "C:\pyzo2014a\lib\site-packages\pip\req.py", line 265, in setup_py
import setuptools
File "C:\pyzo2014a\lib\site-packages\setuptools\__init__.py", line 12, in <module>
import setuptools.version
File "C:\pyzo2014a\lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "C:\pyzo2014a\lib\site-packages\pkg_resources\__init__.py", line 72, in <module>
import packaging.requirements
File "C:\pyzo2014a\lib\site-packages\packaging\requirements.py", line 59, in <module>
 MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
 TypeError: __call__() missing 1 required positional argument: 'name'

这是什么意思?

4

2 回答 2

0

感谢您的帮助,但最好的解决方案是:下载更高版本。就我而言,我已经下载了 Pyzo2016(在http://www.pyzo.org/start.html#quickstart上),然后我安装了:它和“Python 环境”。并通过使用语法:

conda install pillow

写在我的 shell 上,我已经安装了 modul PIL,它工作得很好!!

于 2017-02-23T16:36:39.350 回答
0

似乎该程序正在尝试从源代码构建 Pillow 并且失败了。在 Windows 上,程序通常以二进制(预构建)形式分发,因此可以避免整个构建过程。

Pyzo 带有两个用于安装 pacakges 的工具。从源代码构建的 Pip 和安装二进制文件的 Conda。

要使用 Conda 安装 Pillow,请打开程序cmd并运行

C:\Pyzo2014\Scripts\conda.exe install Pillow
于 2017-01-25T22:11:19.320 回答