본문 바로가기

About my life/Development Studies

[Vscode] Running cells with '/bin/python3' requires the ipykernel package

728x90
반응형
파이썬 공부를 하시는 분들 중에 완전 초보분들은 잘 모르실 것 같아서 올립니다.

VSCODE 에서 jupyter notebook 을 사용하여 파이썬을 실행시킨다면 처음에 같은 에러가 발생할 겁니다.

주의할 점은 운영체제 환경은 Ubunu 20.04 라는 점입니다~!


 

Running cells with '/bin/python3' requires the ipykernel package.
Run the following command to install 'ipykernel' into the Python environment.
Command: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'

 

 

이 문제가 발생했는데 해결 못하시고 계시면 pip 패키지가 없어서 그렇습니다.

 

Ubuntu 20.04 를 기준으로 pip 를 설치해주시고 ipykernel 을 다운로드 받으시면 해결됩니다.

 

$ sudo apt install python3-pip

 

pip 가 다운로드 되셨으면, 새롭게 Jupyter 로 들어가셔서 필요한 ipykernel 을 UI로 설치하라는 대로 설치 버튼 클릭하시면 됩니다.

 

혹은 

 

터미널에서 ipykernel 을 다운로드 받으시면 됩니다.

 

$ python3 -m pip install ipykernel

 

해결완료입니다~!

 

그림 1. 해결 완료 사진

 

 

Reference:

https://stackoverflow.com/questions/77604621/run-the-following-command-to-install-ipykernel-into-the-python-environment

 

Run the following command to install 'ipykernel' into the Python environment

import pandas as pandas import numpy as np import matplotlib.pyplot as plt import seaborn as sns import cv2 from PIL import Image When I run the above line of code I get the following error: Running

stackoverflow.com

https://stackoverflow.com/questions/9780717/bash-pip-command-not-found

 

bash: pip: command not found

I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anyt...

stackoverflow.com

 

 

728x90
반응형