gpt4 book ai didi

Python 错误 - "ImportError: cannot import name ' dist'"

转载 作者:IT王子 更新时间:2023-10-28 23:52:27 25 4
gpt4 key购买 nike

我在 Ubuntu 16.04 上,我得到:

Traceback (most recent call last):
File "/home/omermazig/.virtualenvs/fixi/bin/pip", line 7, in <module>
from pip import main
File "/home/omermazig/.virtualenvs/fixi/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/home/omermazig/.virtualenvs/fixi/lib/python3.6/site-packages/pip/utils/__init__.py", line 23, in <module>
from pip.locations import (
File "/home/omermazig/.virtualenvs/fixi/lib/python3.6/site-packages/pip/locations.py", line 9, in <module>
from distutils import sysconfig
File "/home/omermazig/.virtualenvs/fixi/lib/python3.6/distutils/__init__.py", line 25, in <module>
from distutils import dist, sysconfig
ImportError: cannot import name 'dist'

当我用 python 运行任何东西时。这专门用于尝试运行“pip freeze”。怎么办?

最佳答案

尝试一下

sudo apt install python3-distutils

关于Python 错误 - "ImportError: cannot import name ' dist'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50201005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com