【问题标题】:Python package no longer working - ImportError: No module named dominatePython 包不再工作 - ImportError: No module named concurrent
【发布时间】:2021-12-26 08:43:40
【问题描述】:

我已经使用 Python 包 Dominate 几个月了,突然它不起作用了:

Traceback (most recent call last):
   File "sitecode.py", line 4, in <module>
     import dominate
ImportError: No module named dominate

我上周运行此代码时没有出现任何问题,并且从那时起没有对代码、Python 或任何包进行任何更新。今晚我尝试更新 Python (2.7)、Dominate (2.1.16),并卸载并重新安装 Dominate,但没有成功。我已经阅读了一堆其他“ImportError: No module named ...”帖子,但没有一个提到突然停止工作的包。 Dominate 仍然可以安装,因此该软件包仍然存在。有人知道发生了什么吗?

【问题讨论】:

  • 一如既往,问题出在sys.path。它的价值是什么? Dominate 安装在哪里?

标签: python package importerror dominate


【解决方案1】:

您可能需要检查几件事:

  1. 尝试卸载并安装dominate 包:
$ pip uninstall dominate
$ pip install dominate
  1. 如果您使用的是 python 环境,请确保您的终端窗口处于该环境中:
$ source ~/venv/bin/activate
$ pip uninstall dominate
$ pip install dominate

【讨论】:

    【解决方案2】:

    尝试使用安装dominate

    pip install dominate
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-10
      • 2011-04-08
      • 2016-08-09
      • 1970-01-01
      • 2017-02-10
      • 2017-04-15
      • 2018-03-08
      相关资源
      最近更新 更多