0

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.

OogieM
  • 35
  • 8
  • 1
    The [documentation](https://pyobjc.readthedocs.io/en/latest/py-modindex.html) for the latest version shows what modules are available. It looks like `Foundations` is now `PyObjCTools.FndCategories`. – martineau Dec 14 '21 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 from Foundation import NSAffineTransform ModuleNotFoundError: No module named 'Foundation'``` – OogieM Dec 14 '21 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. – martineau Dec 14 '21 at 23:24
  • Yep there are some hoops to navigate but according to the latest PyCharm docs I already did that correctly. – OogieM Dec 15 '21 at 04:23
  • You should try your code outside of PyCharm and see if it's the problem. – martineau Dec 15 '21 at 09:10
  • Does not work outside of PyCharm either – OogieM Dec 16 '21 at 20:51

0 Answers0