Dev Tool/Pycharm 3

No Python interpreter configured for the project

다른 사람들이 만들어 놓은 .py 파일을 내 컴퓨터에서 실행 할 경우 상단에 No Python interpreter configured for the project 라는 경고가 발생하는 경우가 있다. 혹은 위와같은 경고를 무시하고 바로 실행한다면 Edit configuration 창이 팝업 되고 Error: Please select a valid Python interpreter 라는 에러를 보게된다. 해결 방법은 아래와 같다. Configure Python interpreter 를 누르면 아래와 같은 사진이 나온다. 왼쪽 Project 항목의 Project Interpreter를 누르고, 우측의 톱니바퀴를 누르고 Add를 누른다. Add를 누르면 다음과 같이 인터프리터 설정을 할 수 있다. System..

Dev Tool/Pycharm 2019.06.09

Remove redundant parentheses

Pycharm 사용 중 에러는 아니지만 다음과 같은 문구가 나오는 경우가 있다. Remove redundant parenthesesThis inspection highlights redundant parentheses in statements. 해당 경우는 불필요한 괄호를 사용했을때 나온다.(파이참 설정에서 해당 밑줄을 제거하는 옵션이 있다.) 예를들어 C++ 에서 if문 사용시조건식을 괄호 안에 사용한다. ex) if (n != 10) 하지만 파이썬에서는 괄호가 필요없다. if n != 10:(if (n != 10): 로 작성하고 실행시켜도 잘 실행된다.) -----------------------------------------------------------------아래는 계산식 에서 괄호를 불필..

Dev Tool/Pycharm 2017.10.07