0

我首先下载了 Python 3.3,然后添加 xlrd 和 xlwt 以与 excel 一起使用。我一直无法安装easy_install,distribute或以上任何一个。

这是我在下载分发、解压缩并distribute_setup.py从 IDLE 运行后收到的错误消息:

Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
Extracting in c:\users\t\appdata\local\temp\tmpecnfj9
Now working in c:\users\t\appdata\local\temp\tmpecnfj9\distribute-0.6.49
Installing Distribute
Something went wrong during the installation.
See the error message above.
Traceback (most recent call last):
  File "C:\Python33\Lib\site-packages\distribute-0.6.49\distribute_setup.py", line 556, in <module>
    sys.exit(main())
SystemExit: 2 

总的来说,我无法安装和使用任何模块。我假设我错过了一个非常基本的步骤。

4

3 回答 3

1

在 Python 3.3 中,setuptools替换distribute. 下载并安装setuptools,你应该很高兴。您可能还需要考虑pip在安装 setuptools 后进行安装。按照setuptoolspip中的说明进行操作pypi

于 2013-07-30T00:48:46.503 回答
0

将 Python 安装在您下载了 .msi 格式的 Python 源的驱动器中,或者您可以更改该源文件的驱动器,然后尝试安装它。只是一个简单的安装过程,没有什么典型的。

于 2015-02-04T16:44:32.700 回答
0

不用担心。确保您已完成以下操作

  1. 确保您已安装 python 和 pip并可从命令行访问。键入这两个命令以确保您安装了 python 和 pip3:pip3 湾。python3 如果您收到任何消息告诉您您的系统上没有安装它们

  2. 使用pip3 install PACKAGE_NAME_HERE终端/cmd 中的命令安装模块/包

  3. 如果您收到 pip3 command not found 错误,请输入相应的命令 a)如果您使用的是 mac 设备,请安装 brew: brew install python3。然后安装 pip3: brew postinstall python3。然后打电话pip3 -V看看有没有用。b) 如果您使用的是 Linux 设备,请使用,sudo apt install python3-pip来安装 pip

于 2020-12-23T23:57:13.140 回答