ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  PYTHONPATH on Ubuntu Linux
Posted by quantlabs on Jan-11-2019 13:58
HI there
I have set my PYTHONPATH in my Ubuntu Linux .profile to:

export PYTHONPATH=$PYTHONPATH:/home/myuser/DOCS/Documents/python/chartdirector/ChartDirector/lib

When the library files reside for the Linux version of ChartDirector. I can see the PYTHONPATH is correct for the searchable directory needed for ChartDirectory.

When I test the import with a raw Python 3.6.7. interpreter, I get an error as explained below:

import FinanceChart
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/caustic/DOCS/Documents/python/chartdirector/ChartDirector/lib/", line 2, in <module>
    from pychartdir import *
  File "/home/caustic/DOCS/Documents/python/chartdirector/ChartDirector/lib/", line 5, in <module>
    cdDll = __import__("pychartdir" + cdSysVer[0] + cdSysVer[2])
ImportError: /usr/lib/python3.6/lib-dynload/ invalid ELF header

One item I noted was that nor existed in the Linux ZIP download. The import above needed since it reported this file was missing. I manually copied this from my working Mac version to the appropriate directory in my Ubuntu Linux environment.  Is there something or a step I am missing ? Awesome support and product so expect a new customer soon.

  Re: PYTHONPATH on Ubuntu Linux
Posted by quantlabs on Jan-11-2019 14:08
I am also using Ubuntu 18.04. SHould I downgrade my Python interpreter to v 3.4 to get running properly?

  Re: PYTHONPATH on Ubuntu Linux
Posted by Peter Kwan on Jan-12-2019 01:03
Hi quantlabs,

I have just downloaded ChartDirector for Python for Linux (x86_64) and also for Linux (i386/i686). In both distributions, I can find In fact, there is even a

If your Linux Python is 64-bit, please use the Linux for (x86_64). If your Linux Python is 32-bit, please use the Linux for (i386/i686). You cannot use the Mac OS version on a Linux computer.

Please make sure you download the latest version from our web site directly. You need a ChartDirector distribution that is downloaded after Python 3.6 is released, otherwise it cannot possibly have Python 3.6 support. (The latest release is updated on Sept 2018 for Python 3.7 support.)

Please copy everything from "ChartDirector/lib" to a directory in your Python search path. (It needs not just, but also and the fonts subdirectory.) Copying everything ensures it works for all Python versions released as of now.

Hope this can help.

Peter Kwan

  Re: PYTHONPATH on Ubuntu Linux
Posted by quantlabs on Jan-12-2019 01:35
Hi peter
Thanks for the updates. Everything is working now!