Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Resolve Package Not Found" error in anaconda

I installed anaconda in Windows and then I wanted to add this code

conda env create -f robotreviewer_env_local.yml

but I got this error

ResolvePackageNotFound
- spacy=0.101.0
- ptyprocess=0.5.1

How can I solve this problem?

like image 953
adelehasadi Avatar asked May 27 '18 16:05

adelehasadi


People also ask

How do I install packages in Anaconda GUI?

Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not. It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it.

How do I find packages in Anaconda?

Start the Anaconda Navigator application. Select Environments in the left column. A dropdown box at the center-top of the GUI should list installed packages. If not, then select Installed in the dropdown menu to list all packages.

How do I fix package not found?

Find and click your Microsoft Office 2019 application in the list. Select Modify, then "Online Repair" and follow the onscreen instructions. Once the fix is applied, restart your computer and re-try opening your excel workbook to check if the problem has been resolved.


1 Answers

General Strategies

Search for Channels

Try searching in Anaconda Cloud for the specific packages that can't be resolved. Sometimes they might be from channels other than defaults (anaconda). Include your platform (e.g., platform:win-64) in your search to narrow things down faster. If you find a channel that has it, then you can add it to the channels section of the YAML definition.1

Check PyPI

If you can't find Conda channels with the versions you need, head to PyPI and search there. If you find them, move them to the pip section of the YAML.

Remove the Requirements

If you know where to find the packages in source, then remove them from the YAML, and install them locally in the activated environment.

Loosen the Versions

If you don't have a super strict reproducibility concern, you can always remove the versioning (minor, major) to get one that you can install from Conda or PyPI.


1 Of course, if you aren't familiar with the channel source, verify that it's not some malicious code before using it. E.g., download the tar.bz and scan it. I haven't heard of any such attacks, but this seems like an obvious vector.


Specific Resolution of Packages

Spacy

Searching the Anaconda repo shows that neither the anaconda (defaults) nor the conda-forge channels have that Spacy version available for win64 platform. However, there is a dedicated spacy channel, which could be where it was originally obtained. So, in the channels section of the YAML, you could add

channels:
  - spacy

ptyprocess

This package is not found anywhere in Anaconda Cloud, but it is on PyPI, so you should move it the pip section of the YAML file:

pip:
  - ptyprocess=0.5.1
like image 101
merv Avatar answered Sep 18 '22 14:09

merv