1

I am trying to install certain packages like pyautogui,etc. on my macOS Sierra. But it is throwing out some error.

$ sudo pip3 install pyobjc-core

The error is

Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding

Current thread 0x00007fffb7f853c0 (most recent call first):
Abort trap: 6

Can someone help me with this.

nsidn98
  • 1,037
  • 1
  • 9
  • 23
  • It may be caused by an incorrect `PYTHONPATH`. Have you checked [this](https://stackoverflow.com/questions/5694706/py-initialize-fails-unable-to-load-the-file-system-codec) or [this](https://stackoverflow.com/questions/18946286/python3-installed-successfully-but-cannot-be-opened-in-terminal) or [this](https://stackoverflow.com/questions/35978794/python-3-installed-error-when-running)? – Gino Mempin Aug 13 '17 at 12:33
  • 1
    Possible duplicate of [Python3 installed successfully, but cannot be opened in terminal](https://stackoverflow.com/questions/18946286/python3-installed-successfully-but-cannot-be-opened-in-terminal) – phd Aug 13 '17 at 12:42
  • 1
    `PYTHONPATH` or rather `PYTHONHOME`. – phd Aug 13 '17 at 12:43

1 Answers1

0

Perhaps something wrong with your Python installation. Anaconda have better package manager than pre-install Python. I suggest you install Anaconda (download here). Choose Anaconda2 (use Python 2 for less trouble)

Then try again with pip

pip install pyobjc-core
Haha TTpro
  • 5,137
  • 6
  • 45
  • 71
  • Anaconda is not getting installed.I tried conda update anaconda. But I am still getting the same error. – nsidn98 Aug 14 '17 at 15:45