LSB_RELEASE funktioniert nicht nach der Installation von Python 3.6.3 aus der QuellePython

Python-Programme
Anonymous
 LSB_RELEASE funktioniert nicht nach der Installation von Python 3.6.3 aus der Quelle

Post by Anonymous »

Plattform: Ubuntu 17.04 Server < /p>

Die Ubuntu 17.04 -Serverinstallation enthält Python 2.7 und Python 3.5. Die lsb_release -a < /code> fehlgeschlagen: < /p>

root@birds:~# lsb_release -a
Traceback (most recent call last):
File "/usr/bin/lsb_release", line 25, in
import lsb_release
ModuleNotFoundError: No module named 'lsb_release'
< /code>

, aber wenn ich die erste Zeile der Datei lsb_release von

ändern kann#!/usr/bin/python3 -Es< /code>
zu
#!/usr/bin/python3.5 -Es< /code>
Es funktioniert erneut. < /p>

root@birds:~# lsb_release -a
LSB Version: core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
< /code>

Hier finden Sie den Modulsuchpfad: < /p>

python3.5

root@birds:~# python3.5
Python 3.5.3 (default, Sep 14 2017, 22:58:41)
[GCC 6.3.0 20170406] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys

>>> sys.path
['', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages']

>>> import lsb_release

>>> exit()
< /code>

python3 < /p>

root@birds:~# python3
Python 3.6.3 (default, Oct 14 2017, 20:35:42)
[GCC 6.3.0 20170406] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys

>>> sys.path
['', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/root/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/site-packages']

>>> import lsb_release
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'lsb_release'

>>> exit()
< /code>

Weiß jemand, wie man es behebt? Danke.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post