try this
from io import BytesIO
Answer from saigopi.me on Stack Overflow
» pip install bytesbufio
» pip install bytesioex
Is bytesbufio safe to use?
What is bytesbufio?
Is bytesbufio well maintained?
try this
from io import BytesIO
Check if there's no your own version of io.py using following command.
C:\> python -c "import io; print io.__file__"
c:\python27\lib\io.pyc
You should see similar output.
If there's your own version, it shadows builtin version of io package. Rename your own module with a name that does not collide with standard module. (Don't forget pyc files.)
You do not have to explicitly install io. It comes along with python bundle at the time of installing python. Within your code, just do:
import io
and it will work fine
The io module is part of Python already. It is in the standard library from Python 2.6 onwards. See the Python 2 and Python 3 versions of the documentation.
In fact, there is no io package on PyPI to install (the link gives a 404 not-found error).
Note that I expect pycurl to write bytestrings, not Unicode text. You probably want to use io.BytesIO instead here. See Pycurl and io.StringIO - pycurl.error: (23, 'Failed writing body) and the PyCurl documentation.