Search code examples
pythonpython-ggplotrodeo

Python 3.5 Windows cannot run Rodeo example?


I just installed Python 3.5 on windows 10 and was trying to run the startup example from the IDE I choose (Rodeo). The example gives an error when trying to import ggplot. Specifically, at this call

from ggplot import ggplot, aes, geom_bar

which gives me:

ImportErrorTraceback (most recent call last)
 in ()
----> 1 from ggplot import ggplot, aes, geom_bar

C:\Anaconda3\lib\site-packages\ggplot\__init__.py in ()
     17 
     18 
---> 19 from .geoms import geom_area, geom_blank, geom_boxplot, geom_line, geom_point, geom_jitter, geom_histogram, geom_density, geom_hline, geom_vline, geom_bar, geom_abline, geom_tile, geom_rect, geom_bin2d, geom_step, geom_text, geom_path, geom_ribbon, geom_now_its_art, geom_violin, geom_errorbar, geom_polygon
     20 from .stats import stat_smooth, stat_density
     21 

C:\Anaconda3\lib\site-packages\ggplot\geoms\__init__.py in ()
----> 1 from .geom_abline import geom_abline
      2 from .geom_area import geom_area
      3 from .geom_bar import geom_bar
      4 from .geom_bin2d import geom_bin2d
      5 from .geom_blank import geom_blank

C:\Anaconda3\lib\site-packages\ggplot\geoms\geom_abline.py in ()
----> 1 from .geom import geom
      2 
      3 class geom_abline(geom):
      4     """
      5     Line specified by slope and intercept

C:\Anaconda3\lib\site-packages\ggplot\geoms\geom.py in ()
      1 from __future__ import (absolute_import, division, print_function,
      2                         unicode_literals)
----> 3 from ..ggplot import ggplot
      4 from ..aes import aes
      5 

C:\Anaconda3\lib\site-packages\ggplot\ggplot.py in ()
     19 from . import discretemappers
     20 from .utils import format_ticks
---> 21 import StringIO
     22 import urllib
     23 import base64

ImportError: No module named 'StringIO'

So StringIO cannot be imported. I read here that StringIO doens't exist in that form anymore, but the fixes over there did not help me out. Any tips? What might be relevant (although I cannot judge that) is that I'm unable to update Scipy or ggplot via pip install ggplot --upgrade, but I thought/ read somewhere that this happens because I do not have a built in compiler on my windows machine. Many thanks in advance!


Solution

  • Well, I found a solution myself. pip install ggplot --upgrade failed for me, but conda install -c conda-forge ggplot did the trick.