【问题标题】:No module named 'tabulate' when running from cmd从 cmd 运行时没有名为“制表”的模块
【发布时间】:2021-06-10 20:58:35
【问题描述】:

我使用一个名为 tf 的 conda 环境,它安装了所有必要的软件包。 如果我在 cmd 中运行 python 文件,我会收到以下错误:

我多次重新安装了该软件包,但没有任何区别。 但是,如果我从 PyCharm(也使用 tf conda 环境)运行我的文件,它可以正常工作。这怎么可能?

【问题讨论】:

  • 什么是start_gui.py?是否使用了正确的 python 解释器?
  • 是的。正如我已经提到的,它在 PyCharm 中运行良好。所以这个文件没有问题
  • python start_gui.py 是做什么的?也许 Windows 正在通过系统默认解释器运行 Python 脚本,而不是在 PATH 上优先考虑的 python(即 tf Conda env 中的那个)。

标签: python conda tabulate


【解决方案1】:

您是否尝试过使用conda install -c conda-forge tabulate

如果这不起作用,您可以通过此链接尝试其他 3 个选项:https://anaconda.org/conda-forge/tabulate

【讨论】:

    猜你喜欢
    • 2021-07-07
    • 2017-08-08
    • 1970-01-01
    • 2015-07-12
    • 2015-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-06
    相关资源
    最近更新 更多