• Pip trouble


    Hi, I guess I messed up my system and was thinking to reinstall from fresh, but before id like to understand what I did wrong and thats why I post here. Well, Im using Xcfe desktop and some weeks ago began to install different packages for use in command line, specially Hangups, which needed pip3, after some research installed it and everuthing was kinda smooth, then some days ago after the update of python3 (3.5) to 3.6 it stop working and it shows:

    Traceback (most recent call last):
      File "/usr/bin/hangups", line 6, in <module>
        from pkg_resources import load_entry_point
    ModuleNotFoundError: No module named 'pkg_resources'
    

    So i just realised now i have 3 pythons, and no pkg_resources or tools working, so i tried to uninstall and i get

    Traceback (most recent call last):
      File "/usr/bin/pip", line 7, in <module>
        from pip import main
    ModuleNotFoundError: No module named 'pip'
    

    Somewhere i read about to found or download manually the resources and just copy to the folder, just wonder if i will just finish to mess it up. Also was thinking just to remove all python and reinstall.
    Thanks a lot for your time.

  • @shuichih said in Pip trouble:

    then some days ago after the update of python3 (3.5) to 3.6 it stop working

    Yes, I’m sure you have all your packages in /usr/lib/python3.5/site-packages folder instead of /usr/lib/python3.6/site-packages

    Have you tried reinstalling pip? sudo pacman -S python-pip

    Then you should have to reinstall all packages that you installed with pip.

  • @karasu Thanks for help, after to try reinstall i get

    resolving dependencies...
    looking for conflicting packages...
    
    Packages (6) python-appdirs-1.4.0-5  python-packaging-16.8-2
                 python-pyparsing-2.1.10-2
                 python-setuptools-1:33.0.0-1  python-six-1.10.0-3
                 python-pip-9.0.1-2
    
    Total Installed Size:  8.46 MiB
    
    :: Proceed with installation? [Y/n] y
    (6/6) checking keys in keyring                     [#########] 100%
    (6/6) checking package integrity                   [#########] 100%
    (6/6) loading package files                        [#########] 100%
    (6/6) checking for file conflicts                  [#########] 100%
    error: failed to commit transaction (conflicting files)
    python-setuptools: /usr/bin/easy_install exists in filesystem
    python-pip: /usr/bin/pip exists in filesystem
    python-pip: /usr/bin/pip3 exists in filesystem
    Errors occurred, no packages were upgraded.
    
  • So you installed pip manually?

    Well, if that is the case you can force the package installation:
    sudo pacman -S python-pip --force

    Cheers!

  • @karasu Thanks, indeed installed manually, after to try the force reinstall and to install back hangups got a big list of errors, probably somewhere when installing it the first time i made a mistake, have to read the manuals with more attention:

    Traceback (most recent call last):
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2532, in _dep_map
    return self.__dep_map
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2607, in getattr
    raise AttributeError(attr)
    AttributeError: _Distribution__dep_map

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “/usr/bin/hangups”, line 6, in <module>
    from pkg_resources import load_entry_point
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 3019, in <module>
    @_call_aside
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 3003, in _call_aside
    f(*args, **kwargs)
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 3032, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 655, in _build_master
    ws.require(requires)
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 963, in require
    needed = self.resolve(parse_requirements(requirements))
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 857, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2551, in requires
    dm = self._dep_map
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2536, in _dep_map
    for extra, reqs in split_sections(self._get_metadata(name)):
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2967, in split_sections
    for line in yield_lines(s):
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2235, in yield_lines
    for ss in strs:
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 2565, in _get_metadata
    for line in self.get_metadata_lines(name):
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 1467, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 1463, in get_metadata
    value = self._get(self._fn(self.egg_info, name))
    File “/usr/lib/python3.6/site-packages/pkg_resources/init.py”, line 1572, in _get
    with open(path, ‘rb’) as stream:
    PermissionError: [Errno 13] Permission denied: ‘/usr/lib/python3.6/site-packages/protobuf-3.1.0.post1-py3.6.egg/EGG-INFO/requires.txt’

hangups1 python32 pip2 xcfe2 Posts 5Views 591
Log in to reply