Python setup.py install报错File "setup.py", line 64, in 'setuptools>=0.6c5',

今天安装gitosisi的时候,执行Python setup.py install报错如下:

Traceback (most recent call last):
  File "setup.py", line 64, in 
    'setuptools>=0.6c5',
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 101, in do_egg_install
    cmd.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 380, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 604, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 655, in install_item
    self.process_distribution(spec, dist, deps)
  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)

应该是我的setuptools>=0.6c5版本太低了

解决办法:
官网:https://pypi.org/project/setuptools/18.0.1/#using-setuptools-and-easyinstall
找到了如下:
Python setup.py install报错File =0.6c5',_第1张图片" width="650" height="448" style="border:1px solid black;">
执行
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
之后在执行Python setup.py install就成功了!

你可能感兴趣的:(linux)