1

I have been using the answer provided here and that works just fine under Python 3.7 using pyobjc 6.1

Change title of Tkinter application in OS X Menu Bar

However I am starting a new project and am using Python 3.8 and the latest pyobjc 8.1 and even though pyobjc is installed and I can see it in the path I get the error

from Foundation import NSBundle ModuleNotFoundError: No module named 'Foundation' 

I'm at a loss now as to how to get it working again.

7
  • 1
    The documentation for the latest version shows what modules are available. It looks like Foundations is now PyObjCTools.FndCategories. Commented Dec 14, 2021 at 19:41
  • Tried this from PyObjCTools.FndCategories import NSBundle Got error in the module File "/Users/eugeniemmcguire/PycharmProjects/AnimalTrakkerSystem/venv/lib/python3.8/site-packages/PyObjCTools/FndCategories.py", line 6, in <module> from Foundation import NSAffineTransform ModuleNotFoundError: No module named 'Foundation' Commented Dec 14, 2021 at 22:15
  • I don't use it myself, but from other questions I've seen here, you have to do something special to make PyCharm aware of third-part modules you have installed or are installing. Check the documentation. Commented Dec 14, 2021 at 23:24
  • Yep there are some hoops to navigate but according to the latest PyCharm docs I already did that correctly.<sigh> Commented Dec 15, 2021 at 4:23
  • You should try your code outside of PyCharm and see if it's the problem. Commented Dec 15, 2021 at 9:10

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.