pycharm 找不到路径的问题

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000592884-How-do-I-add-path-to-custom-module

官方论坛的解决方法。

适用于:在shell里可以正常运行,但在pycharm里 no module named XXX(而且shell的sys.path和pycharm里的sys.path打印出来也不一样)

截图里的页面是点File->default setting出现的,必须选择project interpreter(比如3.6.1),点setting符号,然后选more,还得选python的版本,才能看到路径列表。把module XXX 的路径加到路径列表里,应该就可以了。

猜你喜欢

转载自blog.csdn.net/codechelle/article/details/78709804
今日推荐