Code Monkey home page Code Monkey logo

Comments (2)

Toumash avatar Toumash commented on May 31, 2024

This docker container executing minio install and import is working just fine. Are you sure you are not using some virtualenv, and that the shell and directory has the minio installed?

Actual problem

Your pip "pip 21.2.4 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)" is different from the python you are using. Make sure you are using the same pip/python combination

The easiest solution ✨

just run

import subprocess
import sys

def install(package):
    subprocess.check_call([sys.executable, "-m", "pip", "install", package])

as stated in:
https://stackoverflow.com/a/50255019/3711660

but really, try to uninstall other versions of python to not confuse yourself

Proof that this is working

docker run --rm -it --name minio_test python:3.7-alpine ash -c "pip install minio==7;pip show minio; echo \"from minio import Minio; print('Hello, world ')\" >> ab.py; python ./ab.py"

Useful commands:

pip show minio # check which minio version you are using
pip install minio # install minio

You can also try to run the script directly without using run_create_bucket.sh by using

pip3 install Minio
python3 ./create_bucket.py
My output
$  docker run --rm -it --name minio_test python:3.7-alpine ash -c "pip install minio==7;pip show minio; echo \"from minio import Minio; print('Hello, world ')\" >> ab.py; python ./ab.py"
Collecting minio==7
  Downloading minio-7.0.0-py3-none-any.whl (72 kB)
     |████████████████████████████████| 72 kB 662 kB/s
Collecting certifi
  Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
     |████████████████████████████████| 145 kB 7.5 MB/s
Collecting urllib3
  Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
     |████████████████████████████████| 138 kB 7.4 MB/s
Collecting configparser
  Downloading configparser-5.0.2-py3-none-any.whl (19 kB)
Installing collected packages: urllib3, configparser, certifi, minio
Successfully installed certifi-2021.5.30 configparser-5.0.2 minio-7.0.0 urllib3-1.26.6
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Name: minio
Version: 7.0.0
Summary: MinIO Python SDK for Amazon S3 Compatible Cloud Storage
Home-page: https://github.com/minio/minio-py
Author: MinIO, Inc.
Author-email: [email protected]
License: Apache License 2.0
Location: /usr/local/lib/python3.7/site-packages
Requires: urllib3, configparser, certifi
Required-by:
Hello, world

from mlflow-docker.

Toumash avatar Toumash commented on May 31, 2024

closing since the issue was resolved

from mlflow-docker.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.