更新python版本后pip3 install 运行出错解决

ubuntu16输入pip3 list报错subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-...

找到lsb_release.py文件和CommandNotFound目录,把它们拷贝到报的错误中subprocess.py所在文件夹命令如下:

#sudo find / -name 'lsb_release.py'

result:

# /usr/share/pyshared/lsb_release.py

# /usr/lib/python2.7/dist-packages/lsb_release.py

# /usr/lib/python3/dist-packages/lsb_release.py

#python -V

# Python 3.6.6

#sudo cp /usr/lib/python3/dist-packages/lsb_release.py /usr/local/lib/python3.6/

本文系转载,初始出处已不详。

你可能感兴趣的:(python,linux,ubuntu)