Conda PackagesNotFoundError prevents installing/uninstalling packages? - anaconda

I have (what I thought to be) a stable conda environment (hold your laughter). In this environment, I've installed numba via pip (again, hold your laughter). I'd like to uninstall via pip, and re-install via conda.
I find this, after uninstalling via pip:
(tasso) ubuntu#ip-XXX:~/Work/ds_util/tasso$ conda install anaconda
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 missing from the target environment:
- mkl==2018.0.3=intel_1
- openmp==2018.0.3=intel_0
- intel-openmp==2019.1=intel_144
- zlib==1.2.11=5
- libffi==3.2.1=11
All of the typical conda tricks don't work here: conda install anaconda gives the same list of missing packages. I would expect a package manager to, you know, manage these packages? Is this a miniconda thing?
More context:
(tasso) ubuntu#ip-XXX:~/Work/ds_util/tasso$ conda info
active environment : tasso
active env location : /home/ubuntu/miniconda3/envs/tasso
shell level : 2
user config file : /home/ubuntu/.condarc
populated config files : /home/ubuntu/.condarc
conda version : 4.7.11
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /home/ubuntu/miniconda3 (writable)
channel URLs : 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
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/ubuntu/miniconda3/pkgs
/home/ubuntu/.conda/pkgs
envs directories : /home/ubuntu/miniconda3/envs
/home/ubuntu/.conda/envs
platform : linux-64
user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Linux/4.15.0-1016-aws ubuntu/18.04.1 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
I'm frustrated by environments that seem to always be out of sync with conda, is this a common problem people deal with?

Related

Install a specific version of PyTorch on M1 chip arm64

I would like to install torch==1.0.0 and torchvision==0.2.1 on my Mac macOS-12.5.1-arm64-arm-64bit in a conda environment (python 3.9).
I referred to the PyTorch documentation: https://pytorch.org/get-started/previous-versions/#v100
using pip :
(first) user#Users-MacBook-Air first-order-model % pip install torch==1.0.0 torchvision==0.2.1
ERROR: Could not find a version that met the torch==1.0.0 requirement (from versions: 1.9.0, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1)
ERROR: No matching distribution found for torch==1.0.0
or conda :
(first) user#Users-MacBook-Air first-order-model % conda install pytorch==1.0.0 torchvision==0.2.1 -c pytorch
Collect the package metadata (current_repodata.json): done
Resolution environment: failed with initial resolution frozen. Retry with a flexible solution.
Collect package metadata (repodata.json): done
Resolution environment: initial frozen resolution failed. Retry with a flexible solution.
PackagesNotFoundError: The following packages are not available in the current channels:
- pytorch==1.0.0
Current channels:
- https://conda.anaconda.org/pytorch/osx-arm64
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/osx-arm64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-arm64
- https://repo.anaconda.com/pkgs/r/noarch
To search for other channels that may provide the conda package you are looking for, go to
you are looking for, go to
https://anaconda.org
and use the search bar at the top of the page.
Do you know if this is possible? I don't think I've seen these versions available for arm64 here https://anaconda.org/soumith/pytorch/files .

Cannot install tensorflow-deps for Apple Silicon

I'm trying to set-up by Apple Silicon Mac to be able to train tf models using its GPU.
I tried following the official instructions but I am getting the following error:
>>> conda install -c apple tensorflow-deps
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:
- tensorflow-deps
Current channels:
- https://conda.anaconda.org/apple/osx-64
- https://conda.anaconda.org/apple/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/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.
Not sure if it should matter but I didn't install Miniforge because I already have Anaconda installed comprehensively. Surely, this can't be the reason? (I didn't want to install Miniforge not to mess up my env by having multiple Conda installations).
I did add the "apple" channel in the Navigator manually and the package does seem to be there:
https://anaconda.org/apple/tensorflow-deps
What am I missing here?
I also struggled with this for a while. The only way I was able to get a successful environment set up was indeed installing conda through mini forge. Based on this link I believe this is because of the other packages Anaconda pre-installs that are not ARM compatible.
I followed this thread to remove my Anaconda installation. Once that is done the instructions you linked should be successful.

How to install ROOT (cern) using Anaconda on Windows 10? [duplicate]

I am attempting to install CERNS ROOT in anaconda, for use of pyRoot. (I am using conda 4.10.3)
I have set up a new environment with python 2.7, because I believe I read somewhere that ROOT does not work well with python 3. After installing python to the new environment and activating it, I have added conda-forge to the current channels and attempted to install the following:
https://anaconda.org/conda-forge/root-dependencies
Using:
conda install -c conda-forge root-dependencies
This however returned the following:
(pyRoot) C:\Users\George>conda install -c conda-forge root-dependencies
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:
- root-dependencies
Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/win-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/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.
I am not sure why this is not working, as I am fairly sure the root-dependencies are available on the conda-forge channel as per the link.
I have tried the following:
SET CONDA_RESTORE_FREE_CHANNEL=1
Just in case it was part of the free channel that may have been dropped, but I still get the same error.
Any ideas are appreciated :)
The package is not built for win-64 platform, which is what OP channel configuration indicates is being used. Consider WSL2 or Docker (ROOT Project provides pre-built images).
If you would like Conda Forge to build a Windows version, submit an Issue on the feedstock. Just be aware that ROOT Project itself only has beta support for Windows natively, so it's likely not a trivial task.

`Solving environment: failed` error when doing `conda env`

I have python 3.7 and latest anaconda.
I am having Solving environment: failed issue with this error code.
ResolvePackageNotFound:
- jpeg==9c=h470a237_1
Could anyone teach me how to solve this problem?
(base) Koos-MBP:downloads jackykoo$ conda env create -f cvcourse_macos.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
- jpeg==9c=h470a237_1
- twisted==17.5.0=py36_0
(base) Koos-MBP:downloads jackykoo$
Here is my conda info
(base) Koos-MBP:downloads jackykoo$ conda info
active environment : base
active env location : /Users/jackykoo/opt/anaconda3
shell level : 1
user config file : /Users/jackykoo/.condarc
populated config files : /Users/jackykoo/.condarc
conda version : 4.7.12
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages :
base environment : /Users/jackykoo/opt/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/jackykoo/opt/anaconda3/pkgs
/Users/jackykoo/.conda/pkgs
envs directories : /Users/jackykoo/opt/anaconda3/envs
/Users/jackykoo/.conda/envs
platform : osx-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Darwin/19.0.0 OSX/10.15
UID:GID : 501:20
netrc file : None
offline mode : False

Anaconda Modules Inaccessible

Disclaimer: something went wrong with my Anaconda environment at one point and my best guess was simply to uninstall/reinstall Anaconda, but now I have been getting the following errors.
I have reinstalled Anaconda successfully, and can verify the presence of various modules. However, when I try to call any given module in Terminal (e.g., jupyter notebook) I get a variation of the following error:
Traceback (most recent call last):
File "/Users/MYNAME/anaconda3/bin/jupyter", line 7, in <module>
from jupyter_core.command import main
ImportError: No module named jupyter_core.command
I do not have sufficient experience with command line programming to decipher other posts on this topic... I'm assuming there's a problem with the executable paths or something? If it helps, here is the output of conda info for me:
active environment : None
shell level : 0
user config file : /Users/MYNAME/.condarc
populated config files : /Users/MYNAME/.condarc
conda version : 4.6.8
conda-build version : 3.17.6
python version : 3.7.1.final.0
base environment : /anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /anaconda3/pkgs
/Users/MYNAME/.conda/pkgs
envs directories : /anaconda3/envs
/Users/MYNAME/.conda/envs
platform : osx-64
user-agent : conda/4.6.8 requests/2.21.0 CPython/3.7.1
Darwin/18.5.0 OSX/10.14.4
UID:GID : MYUID
netrc file : None
offline mode : False
Just reinstall jupyter notebook under that specific conda virtual environment.
Like:
balabala$ conda activate tensorflow_gpuenv
balabala$ pip install jupyter
(I am using ubuntu.)

Resources