Issue
I've moved over to using pyenv
when running python. The problem though is when I execute a module and that module imports other module pyenv
will often print a huge chunk of what to me is gibberish. For example,
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>
As you can see when I imported the module keyboard
I got quite a lot of unwanted output. This happens a lot with pyenv
. What is going on?
Solution
There was a debug print statement accidentally left in pyobjc 6.0. This will be fixed in version 6.0.1. Check this issue and the commit which fixes it. To fix this either downgrade to pyobjc 5.3 or wait for the fix which will be released very soon and upgrade to pyobjc 6.0.1.
Answered By - Ben Hagen