ish icon indicating copy to clipboard operation
ish copied to clipboard

Pip doesn't works

Open R00tFS opened this issue 3 years ago • 2 comments

Hello so if I try to execute pip it doesn't do anything but when I use ctrl + c to stop the command I get this error : ```

^CTraceback (most recent call last): File "/usr/bin/pip", line 33, in sys.exit(load_entry_point('pip==20.3.4', 'console_scripts', 'pip')()) File "/usr/bin/pip", line 25, in importlib_load_entry_point module = import_module(match.group('module')) File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 855, in exec_module File "", line 228, in _call_with_frames_removed File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 6, in import logging File "/usr/lib/python3.9/logging/init.py", line 28, in from string import Template File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 851, in exec_module File "", line 963, in get_code File "", line 1045, in get_data

Also if I wait more the error gets bigger.

R00tFS avatar Jan 17 '22 08:01 R00tFS

It worked for me, it just took a while. Can you post the command you ran before the traceback?

Sjs445 avatar Feb 16 '22 01:02 Sjs445

This is so slow (I haven’t seen any output from pip yet) that I am using this which is much faster:

alias easy_install="python3 -c 'from setuptools import setup; setup()' easy_install"
easy_install PKGNAME

EDIT: from the pypa issue (https://github.com/pypa/pip/issues/11176#issuecomment-1152478400):

Looking at the linked issue, it appears that wherever ish got their copy of /usr/bin/pip from, it's not the one generated by pip itself. It uses importlib to get the entry point for pip, which will be slow if ish has an emulated filesystem. I suspect they get their pip (and python) from some Linux distribution that's part of the ish build, but it's not clear to me which one.

Whether the above is of any help to the ish project in addressing this issue, I don't know. You could try running python -m pip install pytest and see if that's faster - it bypasses the problematic wrapper script so it might be.

And another (https://github.com/pypa/pip/issues/11176#issuecomment-1161966998)

My very intuitive guess is this is probably due to ssl; easy_install uses http, while pip uses https. If that's the case, the slowdown is a necessary tradeoff, and is out of our hands anyway. Not guaranteeing this is the case though, I could be very off, but this might be a place to start investigating for iSH developers.

xloem avatar Jun 10 '22 10:06 xloem