【Python】 'torch' has no member error in VSCode, windows10 해결하기

(Python) ‘torch’ has no member error in VSCode, windows10 해결하기

img

이와 같은 간단한 코드에서, torch에 빨간 줄이 처지며 torch has no member ones 라는 에러가 뜨곤 했다.

(.py파일에만 이와 같은 문제가 발생한다. ipynb파일에는 발생하지 않는다.)

이 문제를 해결하기 위해 이 사이트를 참조해 해결했다.

[http://www.programmersought.com/article/9184357862/]

원래 나의 설정 모습

img

변경 후 설정 모습

img

이 path는 terminal (windows powershell) 을 이용했다.

img


© All rights reserved By Junha Song.