简体   繁体   English

ModuleNotFoundError:在PyCharm(Mac)上没有名为zenpy的模块

[英]ModuleNotFoundError: No module named zenpy on PyCharm (Mac)

I'm not too familiar with mac, but I fired up pycharm to run a script I made that uses the zenpy module. 我对mac不太熟悉,但是我启动了pycharm来运行我使用zenpy模块制作的脚本。 Problem is when I try to execute it, I get the error 问题是当我尝试执行它时,出现错误

Error Message: 错误信息:

Traceback (most recent call last):
  File "/Users/thisisfake/PycharmProjects/untitled1/venv/bin/test.py", line 29, in <module>
    from zenpy import Zenpy
ModuleNotFoundError: No module named 'zenpy'

The obvious answer is, oh, I forgot to add the module to zenpy. 显而易见的答案是,哦,我忘了将该模块添加到zenpy中。 So I went to File -> Preferences for New Projects -> Project Interpreter and added zenpy. 所以我去了File-> New Projects Preferences-> Project Interpreter并添加了zenpy。 Tried the script again, no dice. 再次尝试脚本,没有骰子。 Check the project interpreter and zenpy is definitely there. 检查项目解释器,并且zenpy肯定在那里。 I tried creating a new project entirely and re-adding it that way and no success. 我尝试完全创建一个新项目,然后以这种方式重新添加它,但没有成功。 Tried moving the script to the bin folder, no luck. 试图将脚本移动到bin文件夹,没有运气。 Added zenpy via pip in terminal, same result. 通过终端中的点子添加了zenpy,结果相同。 I'm definitely missing something obvious, any idea what it is? 我肯定缺少明显的东西,知道它是什么吗?

Thanks! 谢谢!

  1. 选择View -> Tool Windows -> Terminal
  2. pip install zenpy

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

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