No,PyCharm 下提示 'no module named time'

 2023-11-18 阅读 29 评论 0

摘要:因為沒有在 PyCharm 的設置中指定 Python 解釋器,在?File/DefaultSettings/Project Interpreter/Python Interpreter 中設置好就可以了。 詳見: http://stackoverflow.com/questions/10987834/importerror-no-module-named-cv2-when-running-django-project-fr

因為沒有在 PyCharm 的設置中指定 Python 解釋器,在?File/DefaultSettings/Project Interpreter/Python Interpreter 中設置好就可以了。

詳見:

http://stackoverflow.com/questions/10987834/importerror-no-module-named-cv2-when-running-django-project-from-pycharm-ide

I'm not quite sure if this works for you guys but it works for me. In my case, it seems to me that I installed OpenCV to work with the default Python arriving with OS X. I remember I tried to install Python 2.7.5 and Python 3 in my Mac as well, I see them when I chose my Python interpreter for Pycharm. And all of them didn't let me import module cv2. So I change to the default Python2.7.2 (/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python). Then, in File/DefaultSettings/Project Interpreter/Python Interpreter, click on the Python interpreter that's been added (Python 2.7.2), click on Paths and locate to "/usr/local/bin/python2.7/site-packages"and add it. Click the blue refresh button, apply and ok. Then it works, both with import and autocompletion.?

Regards

No。轉載于:https://www.cnblogs.com/yaoshi/p/5204888.html

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/1/174815.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息