How to Install Chartdirector?

I am trying to install the ChartDirector module for python. I downloaded, expanded it and put it in /Users/MyName/anaconda/lib/python2.7/site-packages/ChartDirector along with all the other modules I use.

However when I try and call the module I get the following error:

File "Zones.py", line 1, in <module>
from pychartdir import *
ImportError: No module named pychartdir

I have changed my Python Path to include the exact name of the module:

import sys
sys.path.append("/Users/paulbaranowski/anaconda/lib/python2.7/site-packages/ChartDirector")
print(sys.path)

But I am still getting the same error. Do you have any advice as to how to get this to work?

1 Answer

The ChartDirector for Python library is in the "ChartDirector/lib" subdirectory. You would need to copy everything in "ChartDirector/lib" to the Python module directory. Try something like:

cp -r ChartDirector/lib /Users/paulbaranowski/anaconda/lib/python2.7/site-packages

Another method is to simply copy everything in "ChartDirector/lib" to the directory that contains your "Zones.py" script.

See: ChartDirector for Python Installation

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest