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


Groups > comp.lang.python > #77204 > unrolled thread

Re: Py_SetProgramName() and prefixes

Started byMarko Havu <marko.havu@jyu.fi>
First post2014-08-28 15:42 +0300
Last post2014-08-28 15:42 +0300
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#77204 — Re: Py_SetProgramName() and prefixes

FromMarko Havu <marko.havu@jyu.fi>
Date2014-08-28 15:42 +0300
SubjectRe: Py_SetProgramName() and prefixes
Message-ID<mailman.13555.1409229762.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web