Make Anaconda's tkinter aware of system fonts or install new fonts for Anaconda

前端 未结 2 594
生来不讨喜
生来不讨喜 2020-12-06 05:35

I have two Python installations on my Debian Sid notebook, ⑴ the system\'s Python (v.2.7) with a little bunch of utility packages (including Tkinter) and ⑵ Anac

2条回答
  •  -上瘾入骨i
    2020-12-06 06:21

    EDIT: As @gboffi pointed out, this solution only seems like it works, as sudo python doesn't use Anaconda's install, but rather the system default. Using the full Anaconda Python path with sudo still yields the limited font options. I'm going to keep exploring this, but this answer as it stands is clearly incorrect.


    I was having almost the exact same problem, and the "fix" for me was to run Anaconda's Python with sudo. Doing so apparently gives it access to the rest of the fonts that, for whatever reason, it doesn't natively have. (Found this info in a sparsely populated Google Groups discussion.)

    For reference, my system is running Ubuntu 16.04, and Anaconda 4.4.8 with Python 3.6.4.

    python my_script.py yields:

    while sudo python my_script.py yields:

    Oddly they don't overlap, but I'm frustrated enough with Anaconda at this point that I'm done investigating for now. Hope this (maybe) helps! It's a bad solution that's good enough for testing.

提交回复
热议问题