问题描述
安装qira的时候出现了这个错误,大概如下:
Processing ./qiradb
Collecting https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709 (from -r requirements.txt (line 15))
Using cached pyparsing-1.5.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/anciety/qira/venv/lib/python2.7/site-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/home/anciety/qira/venv/lib/python2.7/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/home/anciety/qira/venv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/home/anciety/qira/venv/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-AEFGO0-build/
大概意思应该就是pip安装pyparsing的时候出错了。
问题解决
sudo pip install --upgrade --force pip
sudo pip install setuptools==33.1.1
不过这应该是个临时解决方法,情况应该是setuptools或者pip中有bug,只能先这样临时解决。