Reputation: 301
While trying to local install a python rpm (in directory ~/.local/
)
with python setup.py install --user
I get the error:
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 701, in process_distribution
distreq.project_name, distreq.specs, requirement.extras
TypeError: __init__() takes exactly 2 arguments (4 given)
After checking fileeasy_install in line 701, I found out that Requirement class produced the error which is imported from pkg_resources
I found out that inside folder: /usr/lib/python2.7/site-packages/
there exist:
/usr/lib/python2.7/site-packages/pkg_resources.py
/usr/lib/python2.7/site-packages/pkg_resources/
Inside pkg_resources.py class Requirement takes 4 arguments
while class Requirement from
/usr/lib/python2.7/site-packages/pkg_resources/_vendor/packaging /requirements.py
takes 2 arguments
How may I uninstall folder:
/usr/lib/python2.7/site-packages/pkg_resources/
May I just delete its contents?
Upvotes: 0
Views: 633
Reputation: 95101
I think you should upgrade your setuptools:
pip install -U pip setuptools
Also I believe you should backup and remove pkg_resources.py
, I don't know where the module comes from.
Upvotes: 0