4

I was attempting to install PyObjC on my Mac OS X El Capitan, and about 40 minutes into the download, I received an error and it stopped. I tried installing using the following code in my terminal:

pip install pyobjc

The error says:

Command python setup.py egg_info failed with error code 1 in
/private/var/folders/6x/pl46qrrj2n51fs9z00cw46240000gn/T/pip_build_Dustin/pyobjc-framework
-AVKit
 Storing debug log for failure in /Users/Dustin/Library/Logs/pip.log

I am using Xcode Version 7.3 and have been searching online for some answers but have been unable to find anything that seems to help. Any suggestions as to how to get the download to complete?

4
  • Could you share the log please? Commented Apr 23, 2016 at 16:23
  • pastebin.com/quXXfANz Commented Apr 24, 2016 at 12:26
  • I've also seen elsewhere that some people will downgrade their setup tools version to 19.2 to help with some installations. Would that also be a possibility with pyobjc? Commented Apr 24, 2016 at 12:44
  • It may be that the database for the new version screws up the versions. I suggest you try these methods, especially the last one (installing separately) and see what happens. Commented Apr 24, 2016 at 12:51

3 Answers 3

4

You are using Python 2.7, but from the logs, it appears as though you're trying to install pyobjc for a different version, most probably Python 3.

Line 267: pkg_resources.VersionConflict: (pyobjc-core 2.5.1 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC), Requirement.parse('pyobjc-core>=3.1.1'))

If you wish to use Python 3, use this method to install:

python3 -m pip install pyobj

Alternatively, I suggest you go ahead and download pyobjc from here, and install it manually from the source using this command:

  • For Python 2.7: python2.7 pyobjc/install.py
  • For Python 3.x: python3 pyobjc/install.py

The documentations here and here, clearly explain the installation process in further details. The latter deals with some possible problems, too.

Another alternative is to try easy_install:

python -m easy_install pyobjc

Note

Please ensure that you have commandline-tools from xcode installed before attempting to install pyobjc. Also, make sure that you run this in your terminal beforehand if you use Mac OS X 10.8 or lower.

 xcode-select --install.

Finally, it might be a good idea to install the core separately:

python2.7 -m pip install -U pyobjc-core
python2.7 -m pip install -U pyobjc

Lets try these and see if they work!

Sign up to request clarification or add additional context in comments.

Comments

1

Hey please make sure to check that you have installed these dependencies:

image==1.5.27
numpy==1.17.4
Pillow==6.2.1
requests==2.22.0
opencv-python
olefile==0.46
PyAutoGUI==0.9.48
PyMsgBox==1.0.7
pyobjc-core==6.2
pyobjc-framework-Cocoa==6.1
pyobjc-framework-Quartz==5.3
PyScreeze==0.1.26
PyScreeze==0.1.26
PyTweening==1.0.3
pathlib

Add these to your requirements.txt file and install with pip install -r requirements.txt

That should solve the problem. Also make sure that you are using python versions 3.6 and above

Comments

1

This error recurred in the Python 3 context.

As of the Big Sur update on October 12, 2021, after trying a lot of other solutions, this fixed it for me:

pip install pyobjc-core==8.0b1
pip install pyobjc-framework-Cocoa==8.0b1
pip install pyobjc-framework-Quartz==8.0b1

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.