system
- centos 7.2
- Python 2.7.5
install
I install webhook
pip install webhook
### but hava error,then
yum install python-devel -y
## go on,pip doesn't workding
pip
error
Enter the command contain pip.Then
[root@location src]# pip
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/usr/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)
So,what should I do?!
None of the other uninstall/reinstall/force answers worked for me, but on OS X 10.10.5 with the system Python 2.7.10, I was able to do:
and I was then able to
import pkg_resources
without a problem.Should really learn to stop messing with the system Python…
Use the following command to upgrade pip, which has the bug fixed:
It worked for me (centos 7, python 2.7).
For more details: GitHub
I had the same problem on a fresh virtualenv and apparently this is a conflict between the version requirements for packaging, pip and pyparsing with the new setuptools. What worked for me was to pin down the old one.
Update:
As another answer pointed out, pip has already fixed the bug, so you should try upgrading it instead of using the workaround above.
It worked for me too (centos 7, python 2.7).