[Eric] PYTHONPATH in eric5
akabaila at pcug.org.au
Sat Jun 25 12:36:56 BST 2011
On Sat, 25 Jun 2011 08:02:13 PM Algis Kabaila wrote:
> It seems that eric5 does not take account of PYTHONPATH. The path paradigm
> of Python3.x is different to that of Python2.x. When porting Python2
> scripts to Python3 it becomes necessary to use PYTHONPATH or completely
> remake the structure of the program. Even then, PYTHONPATH is very useful
> and possibly essential.
> Is there a way to get eric5 to take account of PYTHONPATH?
> Thanks for my favourite IDE - eric!
I have not really explained where the PYTHONPATH becomes necessary. The
scripts often have a package that stores various modules required by the
program. Often module2,py needs to use module1.py and that in Python2 is
statement in module2, which is in the same package. In python3, AFAICS, this
import statement fails, unless the package is on the python path. In these
circumstances PYTHONPATH seems to be by far the easiest solution.
I have tested this on a program for structural analysis where, with the
PYTHONPATH activated from CLI the import statement works fine, but not in eric.
If required, I could provide a small, artificially made up example.
Thank you for the great work that you are doing!
More information about the Eric