发布时间:2019-08-12 11:50:48编辑:auto阅读(1198)
今天需要安装一个软件时,发现系统的python版本太低,出现下面的错误:
- File "setup.py", line 39
- with open("ChangeLog", "w") as changelog_file:
- ^
- SyntaxError: invalid syntax
测试
- [root@UNI-HEB-1-N015-bind-006 swift-1.3.0]# yum search apt
- There was a problem importing one of the Python modules
- required to run yum. The error leading to this problem was:
- No module named yum
- Please install a package which provides this module, or
- verify that the module is installed correctly.
- It's possible that the above module doesn't match the
- current version of Python, which is:
- 2.6.5 (r265:79063, Jun 29 2011, 12:30:49)
- [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
- If you cannot solve this problem yourself, please go to
- the yum faq at:
- http://wiki.linux.duke.edu/YumFaq
改回来就好了
- [root@UNI-HEB-1-N015-bind-006 swift-1.3.0]# rm /usr/bin/python
- rm: remove regular file `/usr/bin/python'? y
- [root@UNI-HEB-1-N015-bind-006 swift-1.3.0]# ln -s /usr/bin/python2.4 /usr/bin/python
这个问题暂时未解决,大家先用/usr/local/bin/python2.6执行吧
上一篇: python的tab自动补全
下一篇: Python:收集IP信息
46587
44489
35920
33485
28171
24741
23661
18867
18161
16846
4656°
5215°
4744°
4878°
5543°
4506°
4559°
5099°
5003°
6252°