在 win10 的 Linux 子系统中安装 pip

在运行安装时报错

Traceback (most recent call last):
  File "get-pip.py", line 20649, in 
    main()
  File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip._internal
  File "/tmp/tmp9k70fq86/pip.zip/pip/_internal/__init__.py", line 42, in 
  File "/tmp/tmp9k70fq86/pip.zip/pip/_internal/cmdoptions.py", line 16, in 
  File "/tmp/tmp9k70fq86/pip.zip/pip/_internal/index.py", line 25, in 
  File "/tmp/tmp9k70fq86/pip.zip/pip/_internal/download.py", line 35, in 
  File "/tmp/tmp9k70fq86/pip.zip/pip/_internal/locations.py", line 10, in 
ImportError: cannot import name 'sysconfig'

是系统中少装了东西

sudo apt install python3-distutils

你可能感兴趣的:(在 win10 的 Linux 子系统中安装 pip)