gpt4 book ai didi

python - 无法安装 scanpy

转载 作者:行者123 更新时间:2023-12-02 19:41:55 25 4
gpt4 key购买 nike

您好,我在使用 pip 安装 scanpy 库时遇到问题。这是我运行的命令

pip install scanpy

在安装过程中,它报告以下错误消息:

Collecting scanpy
Downloading https://files.pythonhosted.org/packages/78/cf/b2cc01e9c33613d738c1cdeb5af7d250cf965bda187aa258e45ed25a6a15/scanpy-1.3.1.tar.gz (216kB)
|████████████████████████████████| 225kB 786kB/s
ERROR: Command errored out with exit status 1:
command: /home/john/Desktop/env2/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vIOr01/scanpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vIOr01/scanpy/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-install-vIOr01/scanpy/pip-egg-info
cwd: /tmp/pip-install-vIOr01/scanpy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-vIOr01/scanpy/setup.py", line 2, in <module>
from pathlib import Path
ImportError: No module named pathlib
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

最佳答案

我认为您可能使用自 2020 年初以来已贬值的 python 2 运行安装。您是否尝试过使用 pip3 命令运行 python 3 安装?

pip3 install scanpy

关于python - 无法安装 scanpy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59941061/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com