在具有python 2.7.14的机器上安装BioPython 1.70。想要通过运行测试来验证设置。
$ python run_tests.py
Traceback (most recent call last):
File "run_tests.py", line 148, in <module>
if is_numpy():
File "run_tests.py", line 63, in is_numpy
if is_pypy():
File "run_tests.py", line 54, in is_pypy
if platform.python_implementation() == 'PyPy':
File "/home/foo/python/lib/python2.7/platform.py", line 1460, in python_implementation
return _sys_version()[0]
File "/home/foo/python/lib/python2.7/platform.py", line 1422, in _sys_version
repr(sys_version))
ValueError: failed to parse CPython sys.version: '2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42) \n[GCC 7.2.0]'
如果我想运行任何测试,是否必须编辑/home/foo/python/lib/python2.7/platform.py?
答案 0 :(得分:0)
原来问题是我的PYTHONPATH。
〜/ anaconda2 / lib / python2.7需要先行。我之前有〜/ lib / python,所以它使用了错误的platform.py文件。