下载pip2
[root@node ~]# curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip2.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1863k 100 1863k 0 0 2234k 0 --:--:-- --:--:-- --:--:-- 2234k
安装pip2
[root@node ~]# python2 get-pip2.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at Release process - pip documentation v22.3.dev0 pip 21.0 will remove support for this functionality.
Collecting pip<21.0
Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 1.1 MB/s
Collecting setuptools<45
Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
|████████████████████████████████| 583 kB 13.3 MB/s
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-20.3.4 setuptools-44.1.1 wheel-0.37.1
安装biopython
[root@node ~]# pip2 install biopython
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at Release process - pip documentation v22.3.dev0 pip 21.0 will remove support for this functionality.
Collecting biopython
Downloading biopython-1.77.tar.gz (16.8 MB)
|████████████████████████████████| 16.8 MB 319 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tj9BY1/biopython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tj9BY1/biopython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-doEQsw
cwd: /tmp/pip-install-tj9BY1/biopython/
Complete output (1 lines):
Biopython requires Python 3.6 or later. Python 2.7 detected.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
提示biopython不支持python2.7
安装python3
yum install python3
安装python3-biopython
pip3 install biopython
验证版本
[root@node ~]# python3
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Bio
>>> print (Bio.__version__)
1.79
>>>