前两天卸载一个python模块时,删错了一些东西,导致python2.7崩溃了;整整两天才修复好,但是后面还是遗留了一些问题。
总结:模块卸载时还是尽量不要去手动删除文件。除非你对linux下文件系统特别了解。
# bamCoverage -h
Traceback (most recent call last):
File "/usr/local/bin/bamCoverage", line 4, in <module>
from deeptools.bamCoverage import main
File "/root/.local/lib/python2.7/site-packages/deeptools/bamCoverage.py", line 8, in <module>
from deeptools import writeBedGraph # This should be made directly into a bigWig
File "/root/.local/lib/python2.7/site-packages/deeptools/writeBedGraph.py", line 9, in <module>
from deeptools.utilities import getCommonChrNames
File "/root/.local/lib/python2.7/site-packages/deeptools/utilities.py", line 5, in <module>
import matplotlib as mpl
File "/root/.local/lib/python2.7/site-packages/matplotlib/init.py", line 195, in <module>
"Matplotlib requires six>=1.10; you have %s" % six.version)
ImportError: Matplotlib requires six>=1.10; you have 1.5.2
调用deeptools下bamCoverage工具时,发生了报错;发现错误在与six模块的版本过低。
"Matplotlib requires six>=1.10; you have %s" % six.version)
ImportError: Matplotlib requires six>=1.10; you have 1.5.2
更新six模块:
使用pip install -U
失败了
# pip install -U six
Collecting six
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six
Found existing installation: six 1.5.2
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
root@ubuntu:/work/CHIPseq_test/callpeak# sudo pip install -U six
Collecting six
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six
Found existing installation: six 1.5.2
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
#我又使用了root权限,还是失败
# sudo pip install six --user
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (1.5.2)
matplotlib 2.2.2 has requirement six>=1.10, but you'll have six 1.5.2 which is incompatible.
下面成功了:
# sudo pip install six --upgrade --target="/usr/lib/python2.7/dist-packages"
截取一小段运行报告:
InsecurePlatformWarning
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six
Successfully installed six-1.11.0