今天 在fedora上安装redis 突然提示
Traceback (most recent call last):
File "/usr/bin/dnf", line 57, in <module>
from dnf.cli import main
File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 31, in <module>
import dnf.base
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 26, in <module>
from dnf.comps import CompsQuery
File "/usr/lib/python3.6/site-packages/dnf/comps.py", line 29, in <module>
import dnf.util
File "/usr/lib/python3.6/site-packages/dnf/util.py", line 32, in <module>
import librepo
ModuleNotFoundError: No module named 'librepo'
百度后发现应该是之前使用conda
安装tesserocr
不小心把python3
重装了,把之前的python3
‵的librepo
扩展弄没了
于是先安装librepo
模块
https://rpmfind.net/linux/rpm2html/search.php?query=python3-librepo
rpm -ivh librepo-1.8.1-7.fc28.x86_64.rpm
rpm -ivh python3-librepo-1.8.1-7.fc28.x86_64.rpm
安装完后还是报错
参考一篇文章
https://stackoverflow.com/questions/48291272/no-module-librepo-after-installing-pytorch-on-fedora27
echo 'import sys;sys.path += ["/usr/lib64/python3.6/site-packages/", "/usr/lib64/python3.6/"]' | sudo tee /usr/lib/python3.6/site-packages/lib64.pth
参考
https://stackoverflow.com/questions/48944604/modulenotfounderror-no-module-named-librepo
网友评论