We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2019-03-25 14:51:21 +0200 |
First thing: Thank you very much for updating Python from 3.4 to 3.7, this is huge!
There is a small issue with pip
however. If you attempt to install anything via pip
, the following happens:
> /usr/bin/pip3 install --user -U pip
... a lot of Traceback ...
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 3.
Indeed, running lsb_release -a
fails with error code 3:
> lsb_release -a
LSB Version: :core-3.1-arm:core-3.1-noarch:core-3.2-arm:core-3.2-noarch:core-4.0-arm:core-4.0-noarch:desktop-3.1-arm:desktop-3.1-noarch:desktop-3.2-arm:desktop-3.2-noarch:desktop-4.0-arm:desktop-4.0-noarch
Distributor ID: n/a
Description: (none)
Release: n/a
Codename: n/a
> echo $?
3
However, pip
can be set up to not use lsb_release
to detect the linux distribution. As a quick fix, line 573 in file /usr/lib/python3.7/site-packages/pip/_vendor/distro.py
can be changed to
...
include_lsb=False,
...
for obvious reasons. Now, pip
works agains as expected. Maybe it's possible to change this line permanently in the python3-base
package?
Cheers,
Yann
2 | No.2 Revision |
First thing: Thank you very much for updating Python from 3.4 to 3.7, this is huge!
There is a small issue with pip
however. If you attempt to install anything via pip
, the following happens:
> /usr/bin/pip3 install --user -U pip
... a lot of Traceback ...
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 3.
Indeed, running lsb_release -a
fails with error code 3:
> lsb_release -a
LSB Version: :core-3.1-arm:core-3.1-noarch:core-3.2-arm:core-3.2-noarch:core-4.0-arm:core-4.0-noarch:desktop-3.1-arm:desktop-3.1-noarch:desktop-3.2-arm:desktop-3.2-noarch:desktop-4.0-arm:desktop-4.0-noarch
Distributor ID: n/a
Description: (none)
Release: n/a
Codename: n/a
> echo $?
3
However, pip
can be set up to not use lsb_release
to detect the linux distribution. As a quick fix, line 573 in file /usr/lib/python3.7/site-packages/pip/_vendor/distro.py
can be changed to
...
include_lsb=False,
...
for obvious reasons. Now, pip
works agains as expected. Maybe it's possible to change this line permanently in the python3-base
package?package? Fixing lsb_release
itself seems to be a problem as explained in this answer.
Cheers,
Yann
3 | No.3 Revision |
First thing: Thank you very much for updating Python from 3.4 to 3.7, this is huge!
There is a small issue with pip
however. If you attempt to install anything via pip
, the following happens:
> /usr/bin/pip3 install --user -U pip
... a lot of Traceback ...
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 3.
Indeed, running lsb_release -a
fails with error code 3:
> lsb_release -a
LSB Version: :core-3.1-arm:core-3.1-noarch:core-3.2-arm:core-3.2-noarch:core-4.0-arm:core-4.0-noarch:desktop-3.1-arm:desktop-3.1-noarch:desktop-3.2-arm:desktop-3.2-noarch:desktop-4.0-arm:desktop-4.0-noarch
Distributor ID: n/a
Description: (none)
Release: n/a
Codename: n/a
> echo $?
3
However, pip
can be set up to not use lsb_release
to detect the linux distribution. As a quick fix, line 573 in file /usr/lib/python3.7/site-packages/pip/_vendor/distro.py
can be changed to
...
include_lsb=False,
...
for obvious reasons. Now, pip
works agains as expected.
If you get annoyed by the ”pip is outdated” warning and decide to update it via
python3 -m pip install --user -U pip
, keep in mind that this installs a new copy ofpip
under~/.local/lib/python3.7
and you will have to apply the above fix there as well.
Maybe it's possible to change this line permanently in the python3-base
package? Fixing lsb_release
itself seems to be a problem as explained in this answer.
Cheers,
Yann