Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-BiRqgr/decorator/

本文介绍了解决pip安装decorator包时遇到的错误方法。主要步骤包括:使用sudo apt-get purge python-pip卸载pip,然后重新安装并更新pip及setuptools到最新版本,最后再尝试安装目标包。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

pip install下载工具时报错,出现:

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-BiRqgr/decorator/setup.py", line 4, in <module>
        exec(open('src/decorator.py').read(), dic)  # extract the __version__
      File "<string>", line 162
        print('Error in generated code:', file=sys.stderr)
                                              ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-BiRqgr/decorator/

解决步骤:

sudo apt-get purge python-pip
sudo apt-get install python-pip
sudo pip3 install --upgrade pip
#如果pip3无效则需要先安装python3和pip3
sudo pip install --upgrade setuptools
pip install jenkins

重新安装decorator:

sudo apt install --reinstall python*-decorator

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值