1

我正在使用 lib,并尝试从 python 中的 lib.options 导入 BaseOptions:

from lib.options import BaseOptions

我得到这个错误:

Traceback (most recent call last):
  File "./apps/eval.py", line 13, in <module>
    from lib.options import BaseOptions
ImportError: No module named lib.options

从我看到我没有lib包的方式来看,我尝试通过以下方式下载它:

conda install lib

然后我得到了这个错误:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - lib

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

然后我尝试了这个命令来安装 lib:

pip install lib

之后我得到了这个错误:

Traceback (most recent call last):
  File "./apps/eval.py", line 13, in <module>
    from lib.options import BaseOptions
ImportError: No module named options

我正在使用 Anaconda3 和 python 2.7。

之后,我尝试通过以下方式将我的 python 升级到 python3.7:

conda install python=3.7

但我失败了,遇到了很多冲突。

任何想法我该如何解决这个问题?

4

0 回答 0