Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16987
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; '*not*': 0.05; 'skip:p 60': 0.05; 'url:bugs': 0.05; 'question:': 0.07; 'system?': 0.07; 'python': 0.08; 'path.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:python': 0.10; 'pil': 0.15; "apple's": 0.16; 'from:addr:acm.org': 0.16; 'installer,': 0.16; 'lion': 0.16; 'loaded.': 0.16; 'prepend': 0.16; 'python2.6': 0.16; 'pythons': 0.16; 'received:198.144': 0.16; 'this:': 0.16; '(i.e.': 0.17; 'linux': 0.17; 'wrote:': 0.18; 'instance': 0.18; 'upgraded': 0.18; 'previously': 0.19; 'packaging': 0.21; 'versions': 0.23; '(on': 0.23; 'default,': 0.23; 'libraries': 0.24; 'library.': 0.24; 'shell': 0.24; 'modify': 0.25; 'import': 0.27; '(and': 0.28; 'installing': 0.29; 'rid': 0.29; 'environment': 0.30; 'installed': 0.31; 'version': 0.32; 'received:198': 0.32; 'header:User-Agent:1': 0.33; 'header:X -Complaints-To:1': 0.33; 'there': 0.33; 'to:addr:python-list': 0.34; 'framework': 0.34; 'setting': 0.34; 'legacy': 0.34; 'something': 0.35; 'install': 0.35; 'url:python': 0.36; 'problem.': 0.36; 'but': 0.37; 'run': 0.37; 'another': 0.37; 'problems': 0.37; 'using': 0.38; 'received:org': 0.38; 'some': 0.38; 'several': 0.38; 'bin': 0.39; 'url:org': 0.39; 'either': 0.39; 'should': 0.39; 'being': 0.39; 'recommended': 0.39; 'background': 0.40; 'python.org': 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'types': 0.61; 'your': 0.61; 'details': 0.65; 'here': 0.65; 'further,': 0.67; 'article': 0.74; '2.5.6': 0.84; '2.7.1': 0.84; 'easy_install': 0.84; 'supplies': 0.84; 'profiles': 0.91; 'ships': 0.91; 'snow': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Ned Deily <nad@acm.org> |
| Subject | Re: Using python on OS X Lion |
| Date | Sun, 11 Dec 2011 13:00:37 -0800 |
| References | <CAGZ55DT6XqbrDt-vwgcZsySTyZ=_QxHzPc8f=X0NMRs=fCtT=w@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | baybryj.net |
| User-Agent | MT-NewsWatcher/3.5.3b3 (PPC Mac OS X) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3517.1323637343.27778.python-list@python.org> (permalink) |
| Lines | 55 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1323637343 news.xs4all.nl 6861 [2001:888:2000:d::a6]:37436 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:16987 |
Show key headers only | View raw
In article
<CAGZ55DT6XqbrDt-vwgcZsySTyZ=_QxHzPc8f=X0NMRs=fCtT=w@mail.gmail.com>,
Johann Spies <johann.spies@gmail.com> wrote:
> I have recently upgraded my Snow Leopard to Lion and now I am having all
> problems with python on my system e.g.:
>
> I have install PIL with easy_install but when I do
>
> import PIL
>
> Python cannot find the pil library. Installing psycopg2 in the same way was
> successful and I can use psycopg2 without a problem.
>
> Further, the new version of Python is 2.7.1 in Lion. But when I just run
> 'python' it calls up 2.6.5 - even after I have moved the application
> python2.6 to Trash.
>
> I see several guidelines for using python on OS X: some using macports,
> others homebrew and others 'pip' and 'virtualenv' . I come from a Linux
> background where a proper packaging system like apt (on Debian) prevent
> these types of problems.
>
> So my question: What is the recommended way of setting up a python
> environment in OS X?
>
> And how do I get rid of legacy python libraries on my system?
First, determine which python is being loaded. In OS X 10.7 (Lion),
Apple ships 2.7.1, 2.6.7, and 2.5.6 version of Python (all in /usr/bin)
so the 2.6.5 is coming from elsewhere. If you previously installed a
Python from a python.org installer, the framework will be in
/Library/Frameworks/Python.framework (and *not*
/System/Library/Frameworks, which is where Apple's Pythons are and
should not be modified). The python.org installers, by default, may
modify your shell profiles (i.e. .bash_profile, .profile, et al) to
prepend its framework bin directory to your shell PATH. Look for
something like this:
# Setting PATH for MacPython 2.6
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
There are more details here http://bugs.python.org/issue7107
Also understand that if you use easy_install or pip, each Python
instance needs to have its own version of either one. Apple supplies
versions of easy_install in /usr/bin for its Pythons. If you install
another version of Python, you'll need to install another easy_install
and pip for it as well.
--
Ned Deily,
nad@acm.org
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Using python on OS X Lion Ned Deily <nad@acm.org> - 2011-12-11 13:00 -0800
csiph-web