嗨,我有问题安装scanpy库使用pip。下面是我运行的命令
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-01-28 09:32:33
尝试使用pip3再次运行该命令。如果这不起作用,那么您需要确保您已经安装了Python3,并且使用的是相应版本的Pip。如果你遇到困难,This excellent answer有关于如何进行升级的详细解释。
发布于 2020-01-28 09:26:02
我想您可能已经使用python 2运行了安装,而python 2在2020年初就已经过时了。您是否尝试过使用pip3命令运行Python3的安装?
pip3 install scanpyhttps://stackoverflow.com/questions/59941061
复制相似问题