我 运行 安装 BioPython 时出错,模块无法打开

I am running into errors installing BioPython, modules cannot open

我按照开发人员提供的安装说明安装了 biopython,如下所示:python3.5 -m pip install biopython 我收到以下错误(请参阅下面的消息),我认为所有问题的主要问题是无法打开 Python 模块。我完全重新安装了 Python,我尝试单独下载模块但没有任何帮助。

也许有人有解决方案吗?

完整输出:

$ python3.5 -m pip install biopython
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_posixsubprocess.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_posixsubprocess.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_posixsubprocess.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_posixsubprocess.gcda:Cannot open
Collecting biopython
  Downloading https://files.pythonhosted.org/packages/59/8f/454d961e821d5f600eb59885dc32aa39e3f226357f5d18a839d7ae088722/biopython-1.76-cp35-cp35m-manylinux1_x86_64.whl (2.3MB)
    100% |████████████████████████████████| 2.3MB 836kB/s 
Collecting numpy (from biopython)
  Downloading https://files.pythonhosted.org/packages/ff/18/c0b937e2f84095ae230196899e56d1d7d76c8e8424fb235ed7e5bb6d68af/numpy-1.18.2-cp35-cp35m-manylinux1_x86_64.whl (20.0MB)
    100% |████████████████████████████████| 20.0MB 101kB/s 
Installing collected packages: numpy, biopython
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/usr/local/lib/python3.5/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/local/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/site-packages/numpy'
You are using pip version 9.0.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/unicodedata.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/fcntlmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_elementtree.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_csv.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/arraymodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_multiprocessing/semaphore.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_multiprocessing/multiprocessing.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/termios.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/expat/xmltok.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/expat/xmlrole.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/expat/xmlparse.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/pyexpat.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_pickle.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_bisectmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_json.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_posixsubprocess.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/grpmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_lzmamodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_bz2module.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/zlibmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/libffi/src/x86/ffi64.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/libffi/src/closures.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/libffi/src/prep_cif.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/cfield.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/stgdict.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/callproc.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/callbacks.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ctypes/_ctypes.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_randommodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_hashopenssl.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_datetimemodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/binascii.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_ssl.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/selectmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_math.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/mathmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/socketmodule.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_struct.gcda:Cannot open
profiling:/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/build/temp.linux-x86_64-3.5/media/biosys5/bigDisk/Users/Programs/Python-3.5.9/Modules/_heapqmodule.gcda:Cannot open

要解决 Permission denied 问题,请尝试 运行 pip install 使用 --user 标志:

$ python3.5 -m pip install --user biopython

可能发生了 Permission Denied 错误,因为您的用户在 python 安装文件夹中没有写权限。

pip install biopython --user

sudo pip install biopython 应该可以解决问题。希望这对您有所帮助!