[python3 numpy] idle에서는 에러가 없는데 pycharm에서는 오류가 납니다.

opencv로 테스트하려고 샘플을 구했습니다.
앞 부분에서 이런 식으로 import를 하는데
--------------------------------
import numpy as np
import cv2
def showVideo():
try:
print('Camera Drives')
cape = cv2.VideoCapture(0)
--------------------------------
그리고 파이참으로 실행하니, 이미 설치돼있는 numpy에서 "ImportError: No module named 'numpy'"에러가 나옵니다. IDLE에서 import하면 오류 없습니다. 파이참도 다시 설치해보고 numpy도 다시 설치했는데 마찬가지이구요.
설치는 인터넷을 뒤져서 아래와 같이 했습니다.
---------------------------------------------
(venv) [snsu@\ME~/iee/untitled1 11:42:23]$ sudo apt-get install python-pip python3-pip
[sudo] password for snsu:
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
python-pip is already the newest version (8.1.1-2ubuntu0.4).
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
0개 업그레이드, 0개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
(venv) [snsu@\ME~/iee/untitled1 12:20:46]$ sudo pip3 install -U numpy
The directory '/home/snsu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/snsu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: numpy in /usr/local/lib/python3.5/dist-packages
참고로 우분투 16.04 python3.5입니다.
파이참 인터프리터 세팅은 아래 이미지와 같습니다.
Python3.5(untitled1) ~/iee/untitled1/venv/bin/python
도대체 왜 이러는 걸까요?
첨부 | 파일 크기 |
---|---|
![]() | 41.62 KB |
댓글 달기