Pycharm - 未找到 Python 打包工具

问题描述 投票:0回答:4

我正在尝试在 Pycharm 中为 python3.5 解释器安装软件包。 它说,

未找到Python打包工具。 安装打包工具.

但是当我尝试安装时, It gives this error.

AttributeError: module 'setuptools.dist' has no attribute 'check_specifier'

我使用的是Ubuntu 16.04.2,Pycharm社区版2017.1.1

ubuntu pycharm python-3.5
4个回答
67
投票

运行此命令,您应该能够在 Pycharm 中安装打包工具:

sudo apt install python3-pip

如果您使用的是 Python3 解释器,则它是 python3-pip,而不是 python-pip。


1
投票

我在将 Ubuntu 升级到较新版本时遇到此错误,它自动安装了更新版本的 python 并将其设置为主要 python 版本 (3.8 --> 3.10)。

我删除了项目的 venv 文件夹,并使用当前的 python 版本(3.10)创建了一个新文件夹,这似乎解决了问题。


0
投票

当我使用 python 3.8 解释器打开 pycharm 时,“+”选项不可单击(附加包),在输入 sudo apt install python3-pip 后,它可以工作,并且“+”选项可单击......所以如果您遇到同样的问题,请尝试一下问题。


0
投票

只需使用 pip 安装 setuptools

python -m ensurepip 
python -m pip install --upgrade pip setuptools wheel
© www.soinside.com 2019 - 2024. All rights reserved.