[Fixed]-From io import BytesIO ImportError: cannot import name BytesIO

42👍

try this

from io import BytesIO

5👍

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.)

-1👍

in my case.

import io
from googleapiclient.http import MediaIoBaseDownload

Leave a comment