Mac OSX 10.10 pip installation Issue

Source: Internet
Author: User

After Mac OSX is upgraded to 10.10 (Yosemite), when you install the Python package with Pip and Easy_install, if the package needs to be compiled, the compilation fails with the following error:

Build/temp.macosx-10.10-x86_64-2.7/greenlet.o-o build/lib.macosx-10.10-x86_64-2.7/greenlet.so

Ld:file not Found:python.exe

Clang:error:linker command failed with exit code 1 (use-v to see invocation)

Error:command ' Clang ' failed with exit status 1

Xcode upgrade to 6.1 after Python install compile default clang

It was confusing why Python.exe appeared in OSX, StackOverflow said it was just the default name in OSX, and it didn't make sense to ignore

The answers given in the StackOverflow:

You can add archflags=-wno-error=unused-command-line-argument-hard-error-in-future to ignore this error before Pip install, but this does not solve the problem

The real problem is the problem with Python itself, causing it to not install properly

The problem is: Configure.ac in Python's source code:

Case $ac _sys_system/$ac _sys_release in
...
darwin/*)
# use-undefined Dynamic_lookup whenever possible (10.3 and later).
# This allows a extension to being used in any Python

if test ${macosx_deployment_target} ' > ' 10.2
Then
if test "${enable_universalsdk}"; Then
Ldflags= "${universal_arch_flags}-isysroot ${universalsdk} ${ldflags}"
Fi
Ldshared= ' $ (CC)-bundle-undefined dynamic_lookup '
Ldcxxshared= ' $ (CXX)-bundle-undefined dynamic_lookup '
Bldshared= "$LDSHARED"
Else
Ldshared= ' $ (CC)-bundle '

The problem is with the if test ${macosx_deployment_target} ' > ' 10.2

Version 10.10 < 10.2 The real problem is here.

Solutions

First you need to install the command-line Tool (if you do not install the Execute command xcode-select--install to install)

This is the problem in python2.7.6, the simplest way is to install 2.7.8 or more

Mac OSX 10.10 pip installation Issue

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.