首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装更新cheetah==2.4.4时出现问题

安装更新cheetah==2.4.4时出现问题
EN

Stack Overflow用户
提问于 2020-10-13 21:37:11
回答 1查看 293关注 0票数 1

我正在尝试从我的requirements.txt安装更新:

代码语言:javascript
复制
pip install -r requirements.txt

但是,当安装程序到达cheetah时,它会打印以下错误:

代码语言:javascript
复制
I'm trying to run some updates require by pycharm, so for the update of cheetah I got this error:
Collecting Cheetah==2.4.4 (from -r requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/cd/b0/c2d700252fc251e91c08639ff41a8a5203b627f4e0a2ae18a6b662ab32ea/Cheetah-2.4.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-rnxaujfa/Cheetah/setup.py", line 10, in <module>
        import SetupTools
      File "/tmp/pip-build-rnxaujfa/Cheetah/SetupTools.py", line 50
        except DistutilsPlatformError, x:
                                     ^
    SyntaxError: invalid syntax
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rnxaujfa/Cheetah/

请帮帮我!

EN

回答 1

Stack Overflow用户

发布于 2020-10-13 22:11:38

该错误显示代码是用Python2编写的。可能依赖Cheetah的库也是用Python2编写的。我建议您创建一个anaconda环境并安装Python2.7。

如果您坚持使用Python3,猎豹已发布(https://cheetahtemplate.org/),您应该更新requirements.txt文件中的猎豹版本号,比如Cheetah==3.2.6。您可能还需要使用2to3来升级代码。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64336272

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档