【问题标题】:Installing Basic Python Modules安装基本 Python 模块
【发布时间】:2013-07-29 17:18:40
【问题描述】:

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

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

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 

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

【问题讨论】:

标签: python python-3.3 distribute


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

    【讨论】:

      【解决方案3】:

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

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

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

      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

      【讨论】:

        猜你喜欢
        • 2017-07-24
        • 2016-04-08
        • 2019-06-22
        • 2016-06-12
        • 2014-10-02
        • 2011-08-24
        • 2016-06-29
        相关资源
        最近更新 更多