简体   繁体   English

PyCharm问题

[英]Issue with PyCharm

I've got problems running this code in PyCharm 我在PyCharm中运行此代码时遇到问题

import string
print string.ascii_lowercase

The code runs normally in Python IDLE (version 3.6), whereas in PyCharm it throws an error "No module named 'string' " 该代码可在Python IDLE(版本3.6)中正常运行,而在PyCharm中,它将引发错误“没有名为'string'的模块”

Any ideas why it is going such way? 有什么想法为什么会这样吗?

I'd appreciate any suggestion. 我将不胜感激任何建议。

PS I've also tried to reinstall PyCharm, but the problem still remains PS我也尝试过重新安装PyCharm,但问题仍然存在

Open your preferences in pycharm and go to the Project Interpreter. 在pycharm中打开您的首选项,然后转到Project Interpreter。 Make sure it is pointing to the same python interpreter that you want to use and hit ok. 确保它指向您要使用的同一python解释器,然后单击确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM