No module named ‘distutils.cmd

最近在乌班图上安装深度学习配置环境rknntoolkit1.6.0的问题上出现了问题,困扰我好长时间,

激活环境的时候,输入 pip3 -V 查看版本的时候,出现了

Traceback (most recent call last):
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/bin/pip3", line 5, in
    from pip._internal.cli.main import main
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/cli/main.py", line 9, in
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/cli/autocompletion.py", line 10, in
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/cli/main_parser.py", line 8, in
    from pip._internal.cli import cmdoptions
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in
    from pip._internal.cli.parser import ConfigOptionParser
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/cli/parser.py", line 12, in
    from pip._internal.configuration import Configuration, ConfigurationError
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/configuration.py", line 26, in
    from pip._internal.utils.logging import getLogger
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/utils/logging.py", line 27, in
    from pip._internal.utils.misc import ensure_dir
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 39, in
    from pip._internal.locations import get_major_minor_version
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/locations/__init__.py", line 14, in
    from . import _distutils, _sysconfig
  File "/home/xiaosongsongdeqiuqiu/kouzhaoshibie/huanjingdajian/venv/lib/python3.7/site-packages/pip/_internal/locations/_distutils.py", line 9, in
    from distutils.cmd import Command as DistutilsCommand
ModuleNotFoundError: No module named 'distutils.cmd'

   我们只需要安装 这个即可            sudo apt-get install python3.7-distutils   3.7 是对应你的版本
 

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