【问题标题】:Trying to install python module 'num2words' but getting following issue [duplicate]尝试安装python模块'num2words'但遇到以下问题[重复]
【发布时间】:2020-06-21 00:33:11
【问题描述】:

在我的 64 位 windows 机器上,我已成功安装 pip 20.0.2。然后我尝试使用以下命令安装 numwords 但出现错误。

pip install num2words
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.

很抱歉,上面的屏幕截图不太清楚。
提前致谢。

【问题讨论】:

  • 请将输出添加到您的问题中作为文本。除了一些其他问题之外,它几乎不能作为深红色的黑色屏幕截图阅读。
  • 您正在为全局环境运行 pip,它显然位于系统上的 Program Files - 您作为非管理员用户无权访问,因此您会收到权限错误。您可以以管理员身份运行命令窗口来绕过它,但您可能应该重新考虑 Python 的安装方式以及是否应该从那里使用全局环境。
  • 得到解决方案,只需在命令中添加 --user 开关。

标签: python python-3.x module pip python-module


【解决方案1】:

只需在命令中添加 --user 开关即可获得解决方案。

pip install num2words --user

【讨论】:

    【解决方案2】:
    pip3 install num2words
    

    您收到错误是因为它正在尝试使用旧版本的 python。

    【讨论】:

    • 只需在命令中添加 --user 开关即可获得解决方案。 pip install num2words --user
    猜你喜欢
    • 2019-02-23
    • 2016-08-19
    • 2020-06-28
    • 1970-01-01
    • 2020-08-04
    • 1970-01-01
    • 1970-01-01
    • 2022-10-05
    • 1970-01-01
    相关资源
    最近更新 更多