【问题标题】:Is there a JMESPath Terminal for windows 10?是否有适用于 Windows 10 的 JMESPath 终端?
【发布时间】:2016-12-18 20:40:17
【问题描述】:

我已经在我的 Windows 10 机器上安装了 python 3.5.2。我还通过在 windows 命令行上使用以下命令安装了 JMESPath 终端:

pip install jmespath-terminal

一切顺利,安装成功。

但是当我输入以下内容时: jpterm

它说“jpterm”无法识别。

我是否遗漏了什么或者上面的 pip 命令仅适用于非 Windows 机器?

【问题讨论】:

    标签: python windows pip installation jmespath


    【解决方案1】:

    TL;DR:目前(2017 年 12 月)Windows 根本不支持此功能。

    安装已损坏。您可以从项目的 GitHub 页面 here 获取 jpterm.py 并将其弹出到您的 \pythonXX\Scripts\ 文件夹中。

    然后你会得到这个:

    Traceback (most recent call last):
      File "C:\Python36\Scripts\jpterm.py", line 239, in <module>
        sys.exit(main())
      File "C:\Python36\Scripts\jpterm.py", line 228, in main
        screen = urwid.raw_display.Screen()
      File "C:\Python36\lib\site-packages\Traceback (most recent call last):
    File "C:\Python36\Scripts\jpterm.py", line 239, in <module>
    sys.exit(main())
    File "C:\Python36\Scripts\jpterm.py", line 228, in main
    screen = urwid.raw_display.Screen()
    File "C:\Python36\lib\site-packages\urwid\raw_display.py", line 85, in __init__
    fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
    NameError: name 'fcntl' is not defined\raw_display.py", line 85, in __init__
        fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
    **NameError: name 'fcntl' is not defined**
    

    ...并在urwid 项目问题中查找它(在终端中绘制“窗口”的东西),你会得到这个:

    https://github.com/urwid/urwid/issues/152

    基本上是说“urwid 不支持 Windows”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-23
      相关资源
      最近更新 更多