Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31687 > unrolled thread
| Started by | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| First post | 2012-10-18 15:03 -0700 |
| Last post | 2012-10-18 15:46 -0700 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.python
pip fails to install packages on moutain loin (Mac OS 10.8.2) Peng Yu <pengyu.ut@gmail.com> - 2012-10-18 15:03 -0700
RE: pip fails to install packages on moutain loin (Mac OS 10.8.2) "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-10-18 22:16 +0000
Re: pip fails to install packages on moutain loin (Mac OS 10.8.2) Ned Deily <nad@acm.org> - 2012-10-18 15:43 -0700
Re: pip fails to install packages on moutain loin (Mac OS 10.8.2) Ned Deily <nad@acm.org> - 2012-10-18 15:46 -0700
| From | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| Date | 2012-10-18 15:03 -0700 |
| Subject | pip fails to install packages on moutain loin (Mac OS 10.8.2) |
| Message-ID | <53b38fa2-ea8b-4225-bdf3-b9bcbde31743@o5g2000yqi.googlegroups.com> |
Hi,
I installed Python using python-2.7.3-macosx10.6.dmg on my Mac OS
10.8.2.
When try to use pip to install packages, I get the following message.
Then the installation fails.
gcc-4.2 not found, using clang instead
I then create a link from /usr/bin/gcc to gcc-4.2. Then I run pip
again, I get the following error message.
Does anybody have a solution to install python on Mac OS 10.8.2 so
that packages can be installed with pip?
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/exception:
42:28: error: bits/c++config.h: No such file or directory
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
+/4.2.1/bits/stl_algobase.h:70,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
+/4.2.1/bits/char_traits.h:46,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
+/4.2.1/string:47,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
+/4.2.1/stdexcept:44,
Regards,
Peng
[toc] | [next] | [standalone]
| From | "Prasad, Ramit" <ramit.prasad@jpmorgan.com> |
|---|---|
| Date | 2012-10-18 22:16 +0000 |
| Message-ID | <mailman.2477.1350598593.27098.python-list@python.org> |
| In reply to | #31687 |
Peng Yu wrote > Hi, > > I installed Python using python-2.7.3-macosx10.6.dmg on my Mac OS > 10.8.2. > > When try to use pip to install packages, I get the following message. > Then the installation fails. > > gcc-4.2 not found, using clang instead > > > I then create a link from /usr/bin/gcc to gcc-4.2. Then I run pip > again, I get the following error message. > > Does anybody have a solution to install python on Mac OS 10.8.2 so > that packages can be installed with pip? > > /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/exception: > 42:28: error: bits/c++config.h: No such file or directory > In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+ > +/4.2.1/bits/stl_algobase.h:70, > from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+ > +/4.2.1/bits/char_traits.h:46, > from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+ > +/4.2.1/string:47, > from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+ > +/4.2.1/stdexcept:44, > > Regards, > Peng I would install python+virtualenv+pip from MacPorts to keep it separate from the OS X system Python. MacPorts will take care of everything for you as long as you have Xcode installed. `sudo ports install py27-pip` Ramit Prasad This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.
[toc] | [prev] | [next] | [standalone]
| From | Ned Deily <nad@acm.org> |
|---|---|
| Date | 2012-10-18 15:43 -0700 |
| Message-ID | <mailman.2480.1350600242.27098.python-list@python.org> |
| In reply to | #31687 |
In article
<53b38fa2-ea8b-4225-bdf3-b9bcbde31743@o5g2000yqi.googlegroups.com>,
Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> I installed Python using python-2.7.3-macosx10.6.dmg on my Mac OS
> 10.8.2.
>
> When try to use pip to install packages, I get the following message.
> Then the installation fails.
>
> gcc-4.2 not found, using clang instead
>
>
> I then create a link from /usr/bin/gcc to gcc-4.2. Then I run pip
> again, I get the following error message.
>
> Does anybody have a solution to install python on Mac OS 10.8.2 so
> that packages can be installed with pip?
>
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/exception:
> 42:28: error: bits/c++config.h: No such file or directory
> In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
> +/4.2.1/bits/stl_algobase.h:70,
> from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
> +/4.2.1/bits/char_traits.h:46,
> from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
> +/4.2.1/string:47,
> from /Developer/SDKs/MacOSX10.6.sdk/usr/include/c+
> +/4.2.1/stdexcept:44,
One issue is that you are mixing compilers and SDKs. Python 2.7.3 was
released about the time Apple released Xcode 4.3 which fundamentally
changed where SDKs are located. Xcode 4 no longer uses /Developer at
all, so what is there is likely left behind from 10.7 or earlier
versions of Xcode. Further, Xcode 4.5 which is the currently supported
version on 10.8 does not include an SDK for 10.6. 2.7.3 does have
support for using clang instead of the Xcode 3.2 gcc-4.2 it was built
with. This is untested but the simplest workaround if you are using
Xcode 4.4 or 4.5.* may be to just remove (or at least rename) /Developer
sudo mv /Developer /Developer-old
and make sure you have installed the Command Line Tools component of
Xcode 4.* (Xcode -> Preferences). If there is no directory at the
original SDK path (/Developer/SDKs/MacoOSX10.6.sdk), I believe distutils
will try to build without using an SDK, which may work. Also, you may
need to define env variable CXX if you are building c++:
export CXX=/usr/bin/g++
or export CXX=/usr/bin/clang++
The plan is for the next maintenance release of Python 2.7 to work
better with current Xocde 4.x on 10.7 and 10.7, as the newly released
Python 3.3.0 does.
--
Ned Deily,
nad@acm.org
[toc] | [prev] | [next] | [standalone]
| From | Ned Deily <nad@acm.org> |
|---|---|
| Date | 2012-10-18 15:46 -0700 |
| Message-ID | <mailman.2481.1350600606.27098.python-list@python.org> |
| In reply to | #31687 |
In article <5B80DD153D7D744689F57F4FB69AF4741671D3B6@SCACMX008.exchad.jpmchase.net> , "Prasad, Ramit" <ramit.prasad@jpmorgan.com> wrote: > I would install python+virtualenv+pip from MacPorts to keep > it separate from the OS X system Python. MacPorts will take > care of everything for you as long as you have Xcode installed. > > `sudo ports install py27-pip` Yes, that should be another viable option as all of the components should be built with the same version of the Xcode tool chain. Also, some or all of the third-party packages may already be available as MacPorts ports. -- Ned Deily, nad@acm.org
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web