【问题标题】:Python3.6 on Cygwin can't install modulesCygwin上的Python3.6无法安装模块
【发布时间】:2021-06-14 03:57:05
【问题描述】:

我正在尝试在 cygwin 上运行一个使用“import numpy as np”和其他模块的程序。 当我尝试在 cygwin(使用 python3.6)上编译程序时,我收到一条错误消息,指出找不到模块 enter image description here

我已经更新了我的 pip3,当我尝试执行“pip3 install numpy”时出现错误 enter image description here

【问题讨论】:

  • 请将您的控制台输出放在您的问题中。
  • 同上。您的屏幕截图不包含错误。

标签: python numpy cygwin python-module


【解决方案1】:

Numpy 已经作为 Cygwin 包提供,无需使用 pip 安装 但您需要使用安装程序进行安装。之后

$ cygcheck -c python36
Cygwin Package Information
Package              Version        Status
python36             3.6.13-1       OK

$ cygcheck -c python36-numpy
Cygwin Package Information
Package              Version        Status
python36-numpy       1.19.4-1       OK

因为我有两个包:

$ python3.6
Python 3.6.13 (default, Feb 16 2021, 07:46:47)
[GCC 10.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>>

另请注意,cygwin 上的首选软件包是 python 3.8 所以同样适用于 python38 和 python38-numpy

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-10-23
    • 1970-01-01
    • 2017-06-11
    • 2019-05-07
    • 1970-01-01
    • 2020-04-17
    • 1970-01-01
    相关资源
    最近更新 更多