【问题标题】:pyenv prints module in terminal when executing said modulepyenv 在执行所述模块时在终端中打印模块
【发布时间】:2019-10-18 10:53:19
【问题描述】:

在运行 python 时,我已经转而使用pyenv。但问题是,当我执行一个模块并且该模块导入其他模块pyenv 时,通常会打印出一大块对我来说是胡言乱语的内容。例如,

alias py37="pyenv local 3.7.3 && python"


Admins-MacBook-Pro-4:general kylefoley$ py37
Python 3.7.3 (default, Oct 16 2019, 03:01:07) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyboard
bool b'B' <classmethod object at 0x10a7317f0> <function ivar.bool at 0x10bf8b8c8>
char b'c' <classmethod object at 0x10a731898> <function ivar.char at 0x10bf8b950>
int b'i' <classmethod object at 0x10a763160> <function ivar.int at 0x10bf8b9d8>
short b's' <classmethod object at 0x10a776b70> <function ivar.short at 0x10bf8ba60>
long b'l' <classmethod object at 0x10a781cc0> <function ivar.long at 0x10bf8bae8>
long_long b'q' <classmethod object at 0x10b819f98> <function ivar.long_long at 0x10bf8bb70>

正如你所见,当我导入模块 keyboard 时,我得到了很多不需要的输出。 pyenv 经常发生这种情况。怎么回事?

【问题讨论】:

    标签: pyenv


    【解决方案1】:

    在 pyobjc 6.0 中意外留下了调试打印语句。这将在版本 6.0.1 中修复。 检查这个issue 和修复它的commit。要解决这个问题,要么降级到 pyobjc 5.3,要么等待很快发布的修复程序并升级到 pyobjc 6.0.1。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-26
      • 2014-08-07
      • 1970-01-01
      • 2019-08-03
      相关资源
      最近更新 更多