问题描述
我使用了YAML文件,并将PyYAML导入到我的项目中.
I have used a YAML file and have imported PyYAML into my project.
该代码在PyCharm中工作正常,但是在创建Egg并运行Egg时会出现错误,因为在命令提示符下找不到模块.
The code works fine in PyCharm, however on creation of an egg and running the egg gives an error as module not found on command prompt.
推荐答案
您尚未提供足够的信息来获得确切的答案,但是,对于缺少的python模块,只需运行
You have not provided quite enough information for an exact answer, but, for missing python modules, simply run
py -m pip install PyYaml
或者在某些情况下
python pip install PyYaml
您可能已将其导入到您的项目中(在PyCharm上),但是必须确保已在IDE外部以及python解释器运行它的系统上安装并导入了它
You may have imported it in your project (on PyCharm) but you have to make sure it is installed and imported outside of the IDE, and on your system, where the python interpreter runs it
这篇关于ModuleNotFoundError:没有名为"yaml"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!