Python 尝试在 Anaconda Powershell 上安装时找不到包

Python Package not Found when Trying to Install on Anaconda Powershell

我正在尝试通过 Anaconda Navigator 在 Anaconda 上安装 PyPDF2,以便与 JupyterLab 一起使用。我遇到以下错误:

(base) PS C:\Users\luke.xuereb> conda install PyPDF2 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:

  • pypdf2

Current channels:

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.

我也尝试过使用其他一些 Python 软件包,例如 Tabula 和 natsorted,两者都产生了相同的结果。

经过一些研究,我还尝试通过执行以下操作来更改环境:

conda create --name myenv
conda activate myenv

同样,这没有用。如有任何帮助,我们将不胜感激。

运行 为我工作:conda install -c conda-forge pypdf2 因为 pypdf2 包在 conda forge 中有一个包。 https://anaconda.org/conda-forge/pypdf2

编辑:另外,为什么创建新环境不起作用?如果找不到该命令,您可能必须将 conda 添加到您的 PATH 环境变量中。