当前位置:   article > 正文

ubuntu成功安装高版本python,使用其他命令出现subprocess.CalledProcessError错误_ubuntu报错subprocess.calledprocesserror: command '['

ubuntu报错subprocess.calledprocesserror: command '['/home/mi/python-3.9.0/py

1.ubuntu之前安装python3.5版本,更新升级为python3.7版本。

2.使用pip3 install pyinstaller,报subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

3.执行sudo find / -name 'lsb_release.py'

4.将相关文件进行copy

sudo cp  /usr/share/pyshared/lsb_release.py /usr/local/python3/lib/python3.9/

5.执行sudo locate CommandNotFound

6.将上面的35修改为37 

  1. sudo mv /usr/lib/python3/dist-packages/CommandNotFound/__pycache__/CommandNotFound.cpython-35.pyc /usr/lib/python3/dist-packages/CommandNotFound/__pycache__/CommandNotFound.cpython-37.pyc
  2. sudo mv /usr/lib/python3/dist-packages/CommandNotFound/__pycache__/__init__.cpython-35.pyc /usr/lib/python3/dist-packages/CommandNotFound/__pycache__/__init__.cpython-37.pyc
  3. sudo mv /usr/lib/python3/dist-packages/CommandNotFound/__pycache__/util.cpython-35.pyc /usr/lib/python3/dist-packages/CommandNotFound/__pycache__/util.cpython-37.pyc

 7.再次执行sudo pip3 install pyinstaller 成功

 

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/218878
推荐阅读
相关标签
  

闽ICP备14008679号