LoginSignup
1
1

More than 3 years have passed since last update.

データサイエンティスト100本ノックでSQLがエラーになったときの対処法

Posted at

起こった事象

データサイエンティスト100本ノックをやろうとした時にSQL文が打てなくなった。

解決法

Dockerfile.notebookに以下を追加してコンテナをビルドし直す

FROM jupyter/datascience-notebook:python-3.8.6
#FROM jupyter/datascience-notebook:d53a302fbcd0
USER root
ENV DEBCONF_NOWARNINGS yes
RUN apt-get update
RUN apt-get install -y libpq-dev
USER jovyan
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --no-cache-dir ipython-sql==0.3.9
RUN pip install --no-cache-dir psycopg2==2.8.5
RUN pip install --no-cache-dir imblearn==0.0
RUN pip install ipython-sql ←この一文を追加
RUN Rscript -e "install.packages(c('DBI', 'RPostgreSQL', 'rsample'), dependencies = TRUE, error = TRUE, repos='https://cran.r-project.org')"
#RUN Rscript -e "install.packages(c('DBI', 'RPostgreSQL', 'recipes'), dependencies = TRUE, error = TRUE, repos='https://cran.r-project.org')"

これを追加することでSQL文を打てるようになります。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1