pythonpython-3.xanacondajupyter-labpython-install

Python Package not Found when Trying to Install on Anaconda Powershell


I am trying to install PyPDF2 on Anaconda via the Anaconda Navigator to be used with JupyterLab. I am faced with the following error:

(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.

I have also attempted this with a few other Python packages such as Tabula and natsorted, and both resulted in the same outcome.

I've also tried changing the environment following some research by doing the following:

conda create --name myenv
conda activate myenv

Again, this did not work. Any help would be appreciated, thanks.


Solution

  • Worked for me by running: conda install -c conda-forge pypdf2 as the pypdf2 package has a package in conda forge. https://anaconda.org/conda-forge/pypdf2

    EDIT: Also, why didnt creating a new Environment work? If the command isnt found, you may have to add conda to your PATH envirnment variable.