2

I have a problem where I want to use highcharts. My python version is 3.4.

When I run "import charts", I get the error below.


ImportError    Traceback (most recent call last)
<ipython-input-10-a030638da752> in <module>()
      1 import pymongo
----> 2 import charts

/Users/Alex/anaconda2/envs/py3/lib/python3.4/site-packages/charts/__init__.py in <module>()
      3 __version__ = '0.4.6'
      4 
----> 5 from plot import plot, plotasync, line, area, spline, pie
      6 from server import run_server
      7 

ImportError: cannot import name 'plot'

Is there anyone who can show me the correct way?

Thanks so much!

Brainles71
  • 77
  • 13
alex.l
  • 81
  • 2
  • 7
  • possible duplicate of [How to debug charts package 'No module named 'plot' ' Error](http://stackoverflow.com/questions/31559475/how-to-debug-charts-package-no-module-named-plot-error) – davedwards Feb 23 '17 at 03:27
  • yes it's same. But i still don't know how to deal with it. and i can import charts in python 2.7, but in python 3.x it doesn't work. – alex.l Feb 23 '17 at 03:35
  • add the path to the `charts` package to your `pythonpath` environment variable, since you can import charts in python2.7, add it's path to python3 http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath – davedwards Feb 23 '17 at 03:48
  • it's already in my pythonpath, but i still cannot import charts. feelsbadman – alex.l Feb 23 '17 at 04:24
  • you're right, I got the same error, it looks like maybe it's an open bug https://github.com/arnoutaertgeerts/python-highcharts/issues/49 – davedwards Feb 23 '17 at 05:29
  • alright. I should do my work in python 2. Thank you so much! – alex.l Feb 23 '17 at 05:44

0 Answers0