You are not logged in.

#1 2019-06-27 12:43:28

kyouanon
Member
Registered: 2019-06-27
Posts: 7

Error while using any python/pip commands [Solved]

So this problem started when i was trying to do pacman -Syu i got "file already in system" on python3, So after a bit of googling i thought i understood the problem then i proceeded to remove this directory: "/usr/lib/python3.7/site-packages" and that fucked everything up.

After "researching" i found out that it was a package conflicting problem and i should have used pacman for my pywal and setuptools.
If there's no easy way to fix this then how i can just nuke all my python stuff and reinstall everything? this is a new Arch install and the only packages are probably pywal and setuptools(?).


Here's the output of using the pywal command btw:
ab@ab ~> wal -a 30 -i "/home/ab/Downloads/a.png"
Traceback (most recent call last):
  File "/usr/bin/wal", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pywal==3.3.0' distribution was not found and is required by the application
ab@ab ~>

Last edited by kyouanon (2019-06-27 15:12:54)

Offline

#2 2019-06-27 12:48:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: Error while using any python/pip commands [Solved]

Run pip uninstall on the packages in question and reinstall them from the repo packages.

Offline

#3 2019-06-27 13:48:45

kyouanon
Member
Registered: 2019-06-27
Posts: 7

Re: Error while using any python/pip commands [Solved]

V1del wrote:

Run pip uninstall on the packages in question and reinstall them from the repo packages.

i get the same error while using pip anything

ab@ab ~> pip uninstall pywal
Traceback (most recent call last):
  File "/usr/bin/pip", line 11, in <module>
    load_entry_point('pip==19.0.3', 'console_scripts', 'pip')()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.7/site-packages/pip/_internal/__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
ModuleNotFoundError: No module named 'pip._vendor.urllib3'
ab@ab ~>

Offline

#4 2019-06-27 13:55:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: Error while using any python/pip commands [Solved]

O wait you removed the entire directory? Well yes reinstall your python stuff. But do so using pacman packages, and never run sudo pip install anything ever. pip hase a --user flag for local packages. If you still have conflicting file messages, follow the procedure in https://wiki.archlinux.org/index.php/Pa … )%22_error (you might also want to run

pacman -Qkk

to identify packages that got broken as a result of this action and need a reinstall)

Also please use [ code ] [ /code ] tags for pasting command outputs.

Last edited by V1del (2019-06-27 13:57:03)

Offline

#5 2019-06-27 14:44:26

kyouanon
Member
Registered: 2019-06-27
Posts: 7

Re: Error while using any python/pip commands [Solved]

Thx i was just looking for a way to format code text, so i have uninstalled pip packages and used pacman instead but when i tried to install pywal using it gave me an error that the wal directory exists so i used

sudo pacman -S python-pywal --force

and everything worked, i heard that using --force like this is wrong is that correct?

Last edited by kyouanon (2019-06-27 14:45:29)

Offline

#6 2019-06-27 14:49:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,715

Re: Error while using any python/pip commands [Solved]

kyouanon wrote:

i heard that using --force like this is wrong is that correct?

That is what it is for.  But, it is a tool -- much like a chainsaw -- you had better know what you are doing.  In this case, you are probably okay.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2019-06-27 14:51:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: Error while using any python/pip commands [Solved]

It is generally considered unsafe yes, since you did execute it on a single package installation the fallout shouldn't be all that bad, however the link I posted contains a "safer" way to specify known/needed overrides without putting other paths into jeopardy.

Offline

Board footer

Powered by FluxBB