没有名为setuptools的模块

2024-04-23 22:35:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我想安装twilio的安装文件。当我通过给定的命令安装它时,它会给我一个错误:

No module named setuptools.

你能告诉我该怎么做吗?

我正在使用python 2.7

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Python27>python D:\test\twilio-twilio-python-26f6707\setup.py install
Traceback (most recent call last):
  File "D:\test\twilio-twilio-python-26f6707\setup.py", line 2, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools

Tags: nopytest命令versionwindows错误setup
3条回答

对于Python,运行以下命令

apt-get install -y python-setuptools

对于Python 3。

apt-get install -y python3-setuptools

安装^{}并重试。

try命令:

sudo apt-get install -y python-setuptools

对于ubuntu用户,这个错误可能是因为setuptool没有在系统范围内安装。只需使用以下命令安装setuptool:

sudo apt-get install -y python-setuptools

对于Python3:

sudo apt-get install -y python3-setuptools

之后,使用

sudo python setup.py install

就这些。

相关问题 更多 >