【问题标题】:python module not found after pip installationpip安装后找不到python模块
【发布时间】:2019-10-15 17:00:54
【问题描述】:

尝试使用pip安装PythonQwt,推荐方法如下:

$ python3 -m pip install PythonQwt

Requirement already satisfied: PythonQwt in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.5.5)

Requirement already satisfied: NumPy>=1.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from PythonQwt) (1.17.2)

但我仍然得到这个

$ python3

Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PythonQwt

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

ModuleNotFoundError: No module named 'PythonQwt'

已经在堆栈溢出上查找了不同的答案并尝试了它们

【问题讨论】:

    标签: python module pip


    【解决方案1】:

    虽然包名称是 PythonQwt,但您将其导入为 qwt。官方文档中的一个example 是:

    from qwt import tests
    tests.run()
    

    【讨论】:

    • 哦,哇,我完全错过了!为愚蠢的错误道歉,谢谢。我确实收到“ModuleNotFoundError: No module named 'sip'”,我假设这意味着我也需要安装 sip 出于某种原因
    • 嗯,很奇怪:我这样做了 $ python3 -m pip install sip 并获得了已经满足的要求:sip in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/站点包(5.0.0)已满足要求:/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages 中的 toml(来自 sip)(0.10.0)已满足要求:包装在/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages(来自sip)(19.2)要求已经满足:pyparsing>=2.0.2 in
    猜你喜欢
    • 2021-03-05
    • 2019-02-12
    • 2020-01-17
    • 2017-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-09
    相关资源
    最近更新 更多