Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77204

Re: Py_SetProgramName() and prefixes

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <marko.havu@jyu.fi>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'error:': 0.07; 'importerror:': 0.07; 'problem:': 0.07; 'prefix': 0.09; 'python': 0.11; 'codec': 0.16; 'interpreter,': 0.16; 'path.': 0.16; 'received:fi': 0.16; 'module': 0.19; 'dependent': 0.19; 'load': 0.23; 'error': 0.23; 'skip:" 30': 0.26; 'post': 0.26; 'header:In- Reply-To:1': 0.27; 'libraries': 0.31; 'file': 0.32; 'could': 0.34; 'problem': 0.35; 'thanks': 0.36; 'received:10': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'help,': 0.39; 'to:addr:python.org': 0.39; 'unable': 0.39; 'forum': 0.61; 'full': 0.61; 'header:Message-Id:1': 0.63; 'kind': 0.63; 'charset:windows-1252': 0.65; 'received:130': 0.73
X-Virus-Scanned amavisd-new at cc.jyu.fi
Content-Type text/plain; charset=windows-1252
Mime-Version 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Subject Re: Py_SetProgramName() and prefixes
From Marko Havu <marko.havu@jyu.fi>
In-Reply-To <D361A7BF-0C50-4A59-9083-5F80755F792C@jyu.fi>
Date Thu, 28 Aug 2014 15:42:34 +0300
Content-Transfer-Encoding quoted-printable
References <D361A7BF-0C50-4A59-9083-5F80755F792C@jyu.fi>
To python-list@python.org
X-Mailer Apple Mail (2.1878.6)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.13555.1409229762.18130.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1409229762 news.xs4all.nl 2931 [2001:888:2000:d::a6]:42021
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:77204

Show key headers only | View raw


Marko Havu <marko.havu@jyu.fi> kirjoitti 28.8.2014 kello 12.58:

> I have a problem with Py_Initialize() not being able to find python in the path. Unless I use Py_SetProgramName() with the full path of the python interpreter, I get the following error message:
> Could not find platform independent libraries <prefix>
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> Fatal Python error: Py_Initialize: unable to load the file system codec
> ImportError: No module named ’encodings’

Turns out this was an Anaconda-specific problem: Py_SetProgramName() resolves the prefix to "/opt/anaconda1anaconda2anaconda3". I sent a post to Anaconda public support forum (anaconda@continuum.io) to find out whether it can be solved without setting $PYTHONHOME or calling Py_SetProgramName() with a full path.

Thanks for your kind help,
 Marko Havu

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Py_SetProgramName() and prefixes Marko Havu <marko.havu@jyu.fi> - 2014-08-28 15:42 +0300

csiph-web