Search code examples
pythonpippyautogui

Installation of packages using pip on macOS Sierra


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.


Solution

  • 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