使用matplotlib导入pyplot时输出奇怪

时间:2018-10-05 20:39:15

标签: python matplotlib

我有一台新的笔记本电脑(macOS 10.14),并已对其进行设置以进行计算。我已经使用Macports安装python和pip,并且一直在使用pip添加python包。我用pip安装了matplotlib:

pip install --user matplotlib

这似乎很好用,但是现在每当我导入pyplot时,我都会得到这个奇怪的输出:

MacBook-Pro:~ me$ python
Python 3.4.9 (default, Oct  3 2018, 20:46:32) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib import pyplot
>>> 2018-10-05 15:31:14.562 Python[62746:227553] GetInputSourceEnabledPrefs user file path = /Users/me/Library/Preferences/com.apple.HIToolbox.plist
2018-10-05 15:31:14.562 Python[62746:227553] GetInputSourceEnabledPrefs effective user id path = 501
2018-10-05 15:31:14.563 Python[62746:227553] GetInputSourceEnabledPrefs user pref content = <CFBasicHash 0x7f8182cd6930 [0x7fffa2d578e0]>{type = immutable dict, count = 3,
entries =>
    0 : <CFString 0x7f8182cd63f0 [0x7fffa2d578e0]>{contents = "AppleInputSourceHistory"} = <CFArray 0x7f8182cd68f0 [0x7fffa2d578e0]>{type = immutable, count = 1, values = (
    0 : <CFBasicHash 0x7f8182cd6890 [0x7fffa2d578e0]>{type = immutable dict, count = 3,
entries =>
    0 : <CFString 0x7fffa2dc5f68 [0x7fffa2d578e0]>{contents = "InputSourceKind"} = <CFString 0x7fffa2e0b4a8 [0x7fffa2d578e0]>{contents = "Keyboard Layout"}
    1 : <CFString 0x7fffa2dc0c68 [0x7fffa2d578e0]>{contents = "KeyboardLayout Name"} = U.S.
    2 : <CFString 0x7fffa2df75e8 [0x7fffa2d578e0]>{contents = "KeyboardLayout ID"} = <CFNumber 0xd2e9cb4f7e77f56d [0x7fffa2d578e0]>{value = +0, type = kCFNumberSInt64Type}
}

)}
    1 : <CFString 0x7fffa2de76a8 [0x7fffa2d578e0]>{contents = "AppleSelectedInputSources"} = <CFArray 0x7f8182cd64a0 [0x7fffa2d578e0]>{type = immutable, count = 1, values = (
    0 : <CFBasicHash 0x7f8182cd6420 [0x7fffa2d578e0]>{type = immutable dict, count = 3,
entries =>
    0 : <CFString 0x7fffa2dc5f68 [0x7fffa2d578e0]>{contents = "InputSourceKind"} = <CFString 0x7fffa2e0b4a8 [0x7fffa2d578e0]>{contents = "Keyboard Layout"}
    1 : <CFString 0x7fffa2dc0c68 [0x7fffa2d578e0]>{contents = "KeyboardLayout Name"} = U.S.
    2 : <CFString 0x7fffa2df75e8 [0x7fffa2d578e0]>{contents = "KeyboardLayout ID"} = <CFNumber 0xd2e9cb4f7e77f56d [0x7fffa2d578e0]>{value = +0, type = kCFNumberSInt64Type}
}

)}
    2 : <CFString 0x7fffa2e39da8 [0x7fffa2d578e0]>{contents = "AppleCurrentKeyboardLayoutInputSourceID"} = <CFString 0x7fffa2e57808 [0x7fffa2d578e0]>{contents = "com.apple.keylayout.US"}
}

它似乎没有影响代码输出,但是很烦人并且有些难看。为什么会出现此输出,如何停止它? (到目前为止)其他任何python模块都不会发生。我是pip的新手,这是否表明我在安装过程中做错了什么?谢谢!

0 个答案:

没有答案