You are not logged in.
Pages: 1
Hi!
I am relatively new to the Arch Linux Universe, after a few experiments with Arch in December I decided to switch over from my existing Debian-based Distríbution and start over...
But for whatever reason pythons pip install doesn't appear to be working... I also searched the forum and found an existing thread talking about a very similar issue in python3.8, but the solution there simply didn't do it for me.
If I try to install pyautogui for example, the output is
File "/usr/sbin/pip", line 33, in <module>
sys.exit(load_entry_point('pip==20.2.4', 'console_scripts', 'pip')())
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3.9/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 17, in <module>
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
from pip._internal.index.collector import LinkCollector
File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 14, in <module>
from pip._vendor import html5lib, requests
ImportError: cannot import name 'requests' from 'pip._vendor' (/usr/lib/python3.9/site-packages/pip/_vendor/__init__.py)Can someone provide help?
It doesn't matter if I have to go into the python-libraries and change something by hand, but for the time beeing I'm going to reinstall my Debian based Distro on my second partition until I fixed it...
Thanx ![]()
Last edited by f0rn3u5 (2021-01-17 20:08:51)
Offline
Why are you trying to uses pip?
There's already a package in the AUR...
https://aur.archlinux.org/packages/python-pyautogui/
Offline
Yes, but this won't work for every dependency of the tools I use, I guess.... I mean, I didnt look it up yet, but ussing pip would also be nice for certian github projects build by others... I mean I guess I could also convert the requirements.txt files of those tools by removing the version number and adding python- at the beginning of each line, then add it to an array and use yay to build them from the arch user repository, but...
I mean... shouldn't pip work anyway?
Last edited by f0rn3u5 (2021-01-17 19:50:27)
Offline
Is this pip provided by the package python-pip? If so what is the output of
pacman -Qikk python-pip python-requestsHave you been installing packages using `sudo pip install somepackage`?
Edit:
Fix typo pacman instead of python in command
Last edited by loqs (2021-01-17 20:09:38)
Offline
Offline
@loqs Yes, I installed the python-pip Package, but if I type python -Qikk python-pip python-requests it says unknown argument -Q
if I replace it with small q it says unknown argument k ![]()
@ugjka Weird, I thought I'd tried that already, but for whatever reason it works now... I was about 90% sure I did that already, but maybe I did on my last Arch Installation which was kinda fucked up anyway, because(I guess) I pacstrapped to many packages(?). Sometimes I'm a bit stupid xD
Anyway, thank you for your help!
Last edited by f0rn3u5 (2021-01-17 20:22:28)
Offline
Oops stupid typo
pacman -Qikk python-pip python-requestsOffline
@f0rn3u5 how did you repair the broken site package(s)? `pip install --user package` while correct does not repair the installation.
Offline
I didn't. I just installed pyautogui from the AUR and then tried pip install --user on something else which just worked
Offline
pacman -S lostfilesThe lostfiles program will report files in /usr that do not belong there, because they were not installed by pacman.
At some point, you've run "sudo pip install --upgrade pip", and that now conflicts with pacman's copy. The lostfiles program will tell you which files to delete from /usr/lib/python3.9/site-packages/
Do not ever run "sudo pip" Just run "pip install --user" (this is even the default for modern versions of pip, if you don't run it as root).
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Pages: 1