Ask Your Question

Morishiri's profile - activity

2018-05-23 11:04:55 -0600 received badge  Popular Question (source)
2018-01-09 15:49:45 -0600 commented answer Removed global pip dependencies broke dnf

I fixed other missing packages etc by using dnf (by reinstalling every package missing in rpm-Va) so my system is fine right now in my opinion

2018-01-06 07:14:19 -0600 received badge  Scholar (source)
2018-01-06 07:14:03 -0600 commented answer Removed global pip dependencies broke dnf

I removed /usr/local then dnf started complainign about missing six module. I installed that and everything started to work! Thank you very much!

2018-01-06 07:13:24 -0600 received badge  Supporter (source)
2018-01-05 05:14:51 -0600 received badge  Nice Question (source)
2018-01-03 02:09:30 -0600 commented answer Removed global pip dependencies broke dnf

Unfortunatelly the problem is that I can't run dnf command at all.

2018-01-03 02:09:02 -0600 commented answer Removed global pip dependencies broke dnf

I put this downlaoded packages in proper directories manually. Anyway the problem still exist. It looks like there is something wrong with iniparse module. I added more information in the question.

2018-01-03 02:08:23 -0600 received badge  Editor (source)
2018-01-02 15:29:35 -0600 commented answer Removed global pip dependencies broke dnf

I tried installing that packages with sudo rpm -i --force. It didn't help then. I will try to install them by copying paths as you said, thanks for the advice. I will let you know about the result.

Answering comment above: sudo rpm -Va 'python*' yelds 6532 lines, some of them are marked as missing and some replaced.

About the sudo dnf reinstall 'python*' - I can't execute it, because I'm getting the stack trace which I put in question content.

2018-01-02 14:05:17 -0600 received badge  Student (source)
2018-01-02 12:37:06 -0600 asked a question Removed global pip dependencies broke dnf

Hi,

I was cleaning up some things on my Fedora Workstation 27 and I executed sudo pip3 freeze | sudo pip3 uninstall -y (and the same thing with pip for Python2) which removed all dependencies.

I was not aware that dnf depends on it and I thought that all this packages was recently installed by me.

Now, while running dnf I get the following output:

Traceback (most recent call last):
  File "/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 37, in <module>
    import dnf.conf
  File "/usr/lib/python3.6/site-packages/dnf/conf/__init__.py", line 40, in <module>
    from dnf.conf.config import PRIO_DEFAULT, PRIO_MAINCONFIG, PRIO_AUTOMATICCONFIG
  File "/usr/lib/python3.6/site-packages/dnf/conf/config.py", line 26, in <module>
    from iniparse.compat import ParsingError, RawConfigParser as ConfigParser
  File "/usr/local/lib/python3.6/site-packages/iniparse/__init__.py", line 6, in <module>
    from ini import INIConfig, change_comment_syntax
ModuleNotFoundError: No module named 'ini'

I tried pip3 install ini but it looks like it is not this package, as this is trying to install something written for python2 I guess.

rpm -Va also contains a lot of missing packages, but when I tried to reinstall them via rpm, and it's a lot so installing them manually is a horror due to growing dependency tree. Also some of them seems to not be available on the Internet.

Is there some way to fix dnf or restore it to previous stage?

I found a solution involving yum-deprecated, but it's not available anymore on Fedora 27 and installing it with rpm takes a lot of effort due to dependency tree.

If any information is needed please let me know, I will deliver it right away.

--- EDIT --- Information added ---

I put this downlaoded packages in proper directories manually. Anyway the problem still exist.

Looks like the iniparse mdoule has troubles with ini.py file.

iniparse directory (pwd: /usr/lib/python3.6/site-packages/iniparse has the following files in it:

compat.py        config.py  __init__.py  utils.py   configparser.py  ini.py     __pycache__

and in __pycache__:

compat.cpython-36.opt-1.pyc        ini.cpython-36.opt-1.pyc
compat.cpython-36.pyc              ini.cpython-36.pyc
config.cpython-36.opt-1.pyc        __init__.cpython-36.opt-1.pyc
config.cpython-36.pyc              __init__.cpython-36.pyc
configparser.cpython-36.opt-1.pyc  utils.cpython-36.opt-1.pyc
configparser.cpython-36.pyc        utils.cpython-36.pyc

The sixth line in iniparse's __init__.py contains:

from .ini import INIConfig, change_comment_syntax

so it should be resolved, but it yields that the ini module doesn't exist. What can be the problem here? Maybe something with pyc files?