0

attached screenshot

I'm facing

ModuleNotFoundError: No module named 'sklearn'

in intellij as I'm using docker and airlfow to create a machine learning project eventhough I;ve installed package in the intellij and in docker container as well. Command I used to install in container

docker exec -it project_p-webserver-1  /bin/bash

pip install scikit-learn

and I've also locally installed sklearn from my terminal.

I tried installing the sklearn library in intellij, locally, docker container but nothing worked and error is still there as I'm using airflow for my machine learning model.

  • Did you install the package inside a running container? If so, please try installing it at build time via your Dockerfile. – Andrey Resler Aug 10 '23 at 19:45
  • Do not post text as image. – Itération 122442 Aug 11 '23 at 07:09
  • below is my docker file what should I write can please let me know in this comment box version: '3.7' services: postgres: image: postgres:9.6 environment: - POSTGRES_USER=airflow - POSTGRES_PASSWORD=airflow - POSTGRES_DB=airflow logging: options: max-size: 10m max-file: "3" webserver: build: ./dockerfiles restart: always depends_on: - postgres environment: - LOAD_EX=n - EXECUTOR=Local logging: options: max-size: 10m max-file: "3" – Ashwini Choudhary Aug 11 '23 at 09:19
  • the rest dockerfile content volumes: - ./dags:/usr/local/airflow/dags - ./plugins:/usr/local/airflow/plugins - ./logs:/opt/airflow/logs ports: - "8081:8080" command: webserver healthcheck: test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"] interval: 30s timeout: 30s retries: 3 – Ashwini Choudhary Aug 11 '23 at 09:19

0 Answers0