- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
如果发帖位置不对,我深表歉意 - 我不清楚问题出在哪里。
当使用由运行 Mac OX 10.10 的 Macports 2.3.3 构建的 Python 版本时,我看到了一些非常有趣的行为。我已经完全重新安装了 Macports,并将其复制到 iMac 和 Macbook Air 上,并创建了一个新用户以确保它与我的环境无关。上周并没有发生这种情况,在此期间的某个时候,情况发生了相当大的变化。
一切正常,直到我调用 Python。
$ python
Python 3.4.3 (default, Aug 26 2015, 18:29:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
>>> 2
^D>>>
>>>
在输入结果之前打印,也在我告诉 Python 使用 Control-D 退出之后打印。
此时,终端不再打印所有输入(在 iTerm2 中也是如此)。如果我输入 echo 'this is ouput;输入是隐藏的”
我唯一看到的是:
$ this is ouput; input is hidden
如果我重新调用解释器,事情会变得更奇怪。
$ Python 3.4.3 (default, Aug 26 2015, 18:29:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
>>> 2
^C
KeyboardInterrupt
>>> ^D
>>> exit()
>>> $
正在打印 Control-C(不是标准),而 Control-D 只是被忽略了 - 我必须键入 exit 才能退出提示。
使用 reset
重置终端可以解决所有问题,但与 Python 解释器交互仍然是一场噩梦。
我可以在 Python 2.7、3.3、3.4 和 3.5 中复制这种行为,这让我相信我在错误的地方寻找问题。
Python 的打包安装(来自 Python 网站)工作正常,不会出现这种行为。
$ python3
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
2
>>>
KeyboardInterrupt
>>> ^D
我被难住了。我完全不确定在哪里可以就此问题寻求帮助。我该如何着手找出问题所在?
我打开了一个 bug report on the Macport Trac,然后才意识到这个问题在这里可能会更好。
最佳答案
https://trac.macports.org/ticket/48807
似乎是一个 libedit/curses 交互。编辑端口文件以使用 readline 解决。希望尽快修复。
关于Python、Macports 和缓冲区问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32578009/
如果依赖项构建失败,是否也可以安装端口? 我的意思是,我必须安装 texlive,它需要大量依赖项,而其中一个 (py26-libxml2) 无法构建。有办法跳过吗? 我知道它不安全,但我需要它,而且
假设我想将端口重置为其初始状态,包括其配置文件。这可以通过以下方式实现: sudo port uninstall portname sudo port install portname (停用然后重新
port installed 显示本地机器上所有已安装的包,但是有没有办法列出每个包的大小?谢谢! 最佳答案 我不相信 Macports 有一个内置命令来列出你的安装大小,但你可以这样做: 在终端中试
ginnyweasley:~ s66$ sudo port selfupdate Password: ---> Updating MacPorts base sources using rsync
我正在尝试使用 MacPorts 安装 libiconv。当我的 Mac 运行 10.6 时,我需要构建它以在 OS X 10.5 中运行。所以我把这个添加到 macports.conf : maco
有没有办法查看我通过 MacPorts 安装的所有内容? 我知道我已经安装了 Apache 和 php 5.3.8,但我想看看我还安装了哪些内容。 最佳答案 使用已安装的端口列出您的所有端口。 关于m
我坐在机场这里,想出了一些我想尝试的东西,但如果 macports 下载-编译-下载-编译,我没有时间 sudo port install .但是,如果它下载了所有内容,那么我就可以在飞机上对其进行编
我在 mavericks 上安装了 macports,将 macports 标志更改为 +no_x11 -x11 +quartz 然后继续安装geany。现在剪贴板对 geany 根本不起作用。既不在
当尝试通过 Macports 安装 Imagemagick 时,我在构建 perl5.12 依赖项时不断收到错误消息。它说:错误:处理过程中遇到状态 1。 我试过更新 Macports,独立安装/构建
我正在尝试 self 更新我的 Macport,但收到以下消息: Error: /opt/local/bin/port: port selfupdate failed: Error synchroni
我正在尝试从源代码在 Mavericks 上安装 ATLAS(因为我需要 LAPACK/BLAS),因为通过 Macports 安装失败(可能是出于同样的原因?)。尽管多次尝试设置编译器,但仍无法找到
尝试使用以下命令行在我的机器(PPC、Mac OSX 10.5.7)上安装 ruby19 之后 sudo port install ruby19 ruby的版本没变 ruby -v => ruby
最近两次我使用 MacPorts 安装 mysql5 +server ,未安装允许我在启动时启动 MySQL 的 plist。我不记得上次安装时做了什么,如果有的话,我似乎找不到安装它的方法。我错过了
我目前安装了以下 MacPorts: ImageMagick @6.6.4-9_0+q16 ImageMagick @6.6.5-0_0+q16 (active) 如何将 6.6.4 设置为激活状
hansarijanto$ port -v MacPorts 2.0.3 hansarijanto$ xcodebuild -version Xcode 4.3.2 Build version 4E2
如何找到给定文件名的端口名称,更具体地说是可执行文件? Macport网站似乎没有帮助,因为您只能按标题搜索。 谢谢! 最佳答案 不幸的是,MacPorts当前(2.3.1)仅在安装了端口的情况下才支
每次安装新软件包时,我都会看到以下错误消息: ---> Found 1 broken file(s), matching files to ports Warning: No port py24-s
我想使用 macports 安装节点。 但是它根本不起作用: $ sudo port install nodejs Password: ---> Computing dependencies for
我的某个端口有问题。它编译并安装得很好(port install webkit-gtk),实际问题稍后出现(某个符号没有编译到库中,但细节在这里并不重要)。 为了调试和修复此问题,我想在安装之前对 w
有人见过这个吗? version:1 :debug:main Executing org.macports.main (p7zip) :debug:main Skipping completed or
我是一名优秀的程序员,十分优秀!