3

I am using minio 5.0.1 with this command:

pip install minio

But I still get this error

Traceback (most recent call last):
  File "minio.py", line 2, in <module>
    from minio import Minio
  File "/root/minio.py", line 2, in <module>
    from minio import Minio
ImportError: cannot import name Minio
Quang Vũ
  • 109
  • 1
  • 3
  • 10

1 Answers1

7

i guess it's to late for this answer but anyways:

since you call your python file minio.py he tries to import this file instead of the minio package and failes to find an object inside called Minio.

Rename your py file to miniotest.py and it should work.

czerwe
  • 133
  • 2
  • 6
  • This is 100% spot on. I even had a file named "minio_dl.py" and had to change it to "myminio_dl.py" - no issues after that. – BrettJ Mar 10 '20 at 03:53