PackageNotFoundError even though required channel added to anaconda config? - python

I am working with Ubuntu in WSL and tried to install the required packages for a repo with:
$ conda install --file requirements.txt
I got a PackageNotFoundError for a bunch of different packages. I search on anaconda.org for the required channels and added them. But it doesn't matter which channels I add I always get a PackageNotFoundError for the last two remaining packages:
$ conda install --file requirements.txt
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:
- openssl==1.1.1=h7b6447c_0
- intel-openmp==2019.5=281
Current channels:
- https://conda.anaconda.org/fastchan/linux-64
- https://conda.anaconda.org/fastchan/noarch
- https://conda.anaconda.org/cctbx202208/linux-64
- https://conda.anaconda.org/cctbx202208/noarch
- https://conda.anaconda.org/pytorch/linux-64
- https://conda.anaconda.org/pytorch/noarch
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- 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.
Anaconda.org says conda-forge, fastchan, cctbx202208 for openssl but even though I added all of them it's still not found.
The next thing I tried was to install it with pip:
$ pip install openssl==1.1.1
ERROR: Could not find a version that satisfies the requirement openssl==1.1.1 (from versions: none)
ERROR: No matching distribution found for openssl==1.1.1
But pip detects none versions of this package. Same with intel-openmp, but pip does find packages but not the one I want 2019.5:
$ pip install intel-openmp==2019.5
ERROR: Could not find a version that satisfies the requirement intel-openmp==2019.5 (from versions: 2018.0.0, 2018.0.3, 2019.0, 2020.0.133, 2021.1.1, 2021.1.2, 2021.2.0, 2021.3.0, 2021.4.0, 2022.0.1, 2022.0.2, 2022.1.0, 2022.2.0, 2022.2.1)
ERROR: No matching distribution found for intel-openmp==2019.5
So my question is, is there another way to install the two packages or do they not exists anymore? Because the repo from which I got the code has its last commit from 3 years ago...
Edit:
I tried this command:
conda install -c anaconda openssl
and it installs openssl, but the latest version and than the code still says openssl is missing.
I also tried:
conda install -c anaconda openssl=1.1.1
but I get the same error as in the beginning (PackageNotFoundError in the channels).
Edit2:
TrackNPred is the repo I cloned and want to get working.
As for the required channel, I just searched for the package name on anaconda.org and add the channels i see to my anaconda config with:
conda config --add channels new_channel
I'm not sure if I need the exact version of a package as it's listed in the requirements.txt or if the code also works with another version of the two missing packages.
Edit3:
I changed in the requirements.txt:
openssl=1.1.1*
intel-openmp=2019.5
and that worked.

If you don't require exact package build replication, then edit the file to loosen up the specifications.
I see the intel channel has intel-openmp=2019.5=intel_218 and any openssl=1.1.1 should do. So, find the respective entries in the requirements.txt file and edit them to have:
openssl=1.1.1*
intel-openmp=2019.5
then recreate the environment, with intel channel added.
conda config --set channel_priority flexible
conda create -n foo -c defaults -c intel --file requirements.txt

Related

conda install cannot find colmap package

I am trying to install colmap with conda on Windows 10.
unfortunately it says it cannot find the package despite me having already added the conda-forge channel.
Below is the output:
(base) PS C:\Users\pietro> conda install -c conda-forge colmap
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:
- colmap
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/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 tried to reappend condaforge, and to set my offline status to false, but still no luck.
Thanks for any help!
Cheers
pietro
Update
This should just work now - the Conda Forge feedstock now builds for Windows as well.
Original response
The Conda Forge colmap feedstock currently does not build for the win-64 platform. There is a GitHub Issue requesting/tracking such support, and even a Pull Request that tested adding Windows builds. Please comment on those threads to let the maintainer know that users are interested in seeing that build variant supported.

Unable to install ray[tune] tune-sklearn

I'm trying to install ray[tune] tune-sklearn on my machine but keeps failing. I'm using a MacBook Pro 2019 with Big Sur Version 11.6 and Python 3.9.7 (default, Sep 16 2021, 08:50:36) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin. All other packages I've tried to installed fine either using conda install or pip install except for this one. I'm struggling to find an answer online myself. I was on Python 3.8 but I removed this and installed 3.9 as I thought this was the problem. Apologies in advance, I'm new to data mining and still don't know a great deal yet.
I tried
conda install -c conda-forge -y ray-tune tune-sklearn
But got back this:
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:
- ray-tune
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/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
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 also tried
pip install ray[tune] tune-sklearn
But got back
zsh: no matches found: ray[tune]
Any help would be greatly appreciated, thank you.
Update:
I also tried
pip install 'ray[tune]'
And got back
ERROR: Could not find a version that satisfies the requirement ray[tune] (from versions: none)
ERROR: No matching distribution found for ray[tune]
ray[tune] is a library within the Ray distributed compute project that supports scalable hyperparameter tuning -- not a stand-alone Python package. You should be able to install ray with the proper dependencies using:
pip install "ray[tune]"
After Ray has been installed, you can reference it within your Python project using either:
import ray[tune]
or
from ray import tune

How to install keras-bert? (PackagesNotFoundError: The following packages are not available from current channels)

I'm trying to install keras-bert as explained here: BERT from R. This tutorial shows how to load and train the BERT model from R, using Keras.
But when, in Anaconda prompt (Windows), I run:
conda install keras-bert
I obtain the following error:
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:
- keras-bert
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/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
- https://conda.anaconda.org/conda-forge/win-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.
I also navigate to https://anaconda.org, searching for keras-bert, but there were no items found for this search.
I also tried with:
python3 -m pip install keras-bert
and I obtain no output:
(base) C:\Users\Standard>python3 -m pip install keras-bert
(base) C:\Users\Standard>
but when I went to check whether keras-bert was installed or not, with R command
reticulate::py_module_available('keras_bert')
I obtained:
[1] FALSE
Install from YAML in new env
Since this requires mixing PyPI packages with Conda, the best practice recommendation for this is to create a dedicated environment using a YAML file. You may need additional version constraints in here to achieve a setup that works with the tutorial, but this YAML is sufficient for me to do the first steps:
bert_env.yaml
name: bert_env
channels:
- defaults
dependencies:
- numpy
- keras
- pip
- pip:
- keras-bert
Running
conda env create -f bert_env.yaml
creates the env named bert_env.
From an R session, I can then run
> reticulate::use_condaenv("bert_env", required=TRUE)
> reticulate::py_config()
# python: /Users/user/miniconda3/envs/bert_env/bin/python
# libpython: /Users/user/miniconda3/envs/bert_env/lib/libpython3.6m.dylib
# pythonhome: /Users/user/miniconda3/envs/bert_env:/Users/user/miniconda3/envs/bert_env
# version: 3.6.10 |Anaconda, Inc.| (default, May 7 2020, 23:06:31) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
# numpy: /Users/user/miniconda3/envs/bert_env/lib/python3.6/site-packages/numpy
# numpy_version: 1.18.5
> reticulate::py_module_available("keras_bert")
# [1] TRUE
> tensorflow::tf_config()
# TensorFlow v2.0.0 ()
# Python v3.6 (~/miniconda3/envs/bert_env/bin/python)
This was all run on an osx-64 platform, so win-64 will likely differ in the versions it pulls down. In the end, though, it should mainly be a matter of tweaking the YAML.

How to install the mxnet-1.4.1(CPU-Version) offline in Windows 10 stackoverflow?

I want to try 'GluonTS - Probabilistic Time Series Modeling in Python'.And GluonTS is a Python toolkit for probabilistic time series modeling, built around Apache MXNet (incubating). I must install MXNet 1.4.1, then install GluonTS to try use it.
But my computer cannot link to internet,The installed OS of My PC is windows 10,so I download 'mxnet-1.4.1-py2.py3-none-win_amd64.whl' to install,An error occurred as follows:
(mxnet) H:\PythonApp\Mxnet\2020-3-27>conda install --offline mxnet-1.4.1-py2.py3-none-win_amd64.whl
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
mxnet-1.4.1-py2.py3-none-win_amd64.whl
Current channels:
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/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 a beginner, don't know what to do,Please help me.
The file you are trying install is a pip-file, to install it just activate your conda environment and then:
pip install mxnet-1.4.1-py2.py3-none-win_amd64.whl
If you don't have pip, you will have to install that using anaconda first.

Anaconda - can't install package offline after downloading it

I'm trying to install some packages on a remote machine (with GPUs) that is not connected to the internet.
(Some people have suggested I should be using Docker and I may well do that but here's one last chance to get this working).
FYI: I'm following the instructions here.
What I've done so far:
Downloaded Anaconda Anaconda3-2019.03-Linux-x86_64.sh file and installed it on the remote machine
$ conda --version
conda 4.6.14
Then downloaded the desired package from here and moved it to the remote machine.
$ ls pkgs-for-anaconda/linux-64/*tensorflow*
pkgs-for-anaconda/linux-64/tensorflow-gpu-1.9.0-hf154084_0.tar.bz2
Setup a new channel which is the file path on the local file system.
$ conda config --prepend channels file:///home/billtubbs/pkgs-for-anaconda
Excerpt from config to confirm this worked:
channels:
- file:///home/billtubbs/pkgs-for-anaconda
- defaults
Install the package
$ conda install pkgs-for-anaconda/linux-64/tensorflow-gpu-1.9.0-hf154084_0.tar.bz2
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Index the packages
$ conda index pkgs-for-anaconda/
Subdir: noarch: 100%|████████████████████████████████████| 2/2 [00:00<00:00, 81.80it/s]
(base) [billtubbs#localhost ~]$ ch: 0it [00:00, ?it/s]s]05 [00:00<00:00, 750741.03it/s]
Is the issue that it looked in no noarch instead of linux-64?
Try to install the package
When I use the following to create a new environment with the desired package:
$ conda create -n tf tensorflow-gpu
I get:
Collecting package metadata: done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- tensorflow-gpu -> _tflow_190_select==0.0.1=gpu
- tensorflow-gpu -> tensorflow==1.9.0
Current channels:
- file:///home/billtubbs/pkgs-for-anaconda/linux-64
- file:///home/billtubbs/pkgs-for-anaconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/linux-64
- https://repo.anaconda.com/pkgs/free/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.
What I don't understand is that it shows my channel exists. And it even seems to be looking for the right version (1.9.0). But it says it can't find it.
Just to confirm, I did the following:
$ conda search tensorflow-gpu==1.9.0
Loading channels: done
# Name Version Build Channel
tensorflow-gpu 1.9.0 hf154084_0 pkgs-for-anaconda
tensorflow-gpu 1.9.0 hf154084_0 pkgs/main
Anyone know what I am doing wrong?
UPDATE:
Here is some of the output from
$ conda list --show-channel-urls
...
sympy 1.3 py37_0 defaults
tblib 1.3.2 py37_0 defaults
tensorflow-gpu 1.9.0 hf154084_0 file:///home/billtubbs/pkgs-for-anaconda
terminado 0.8.1 py37_1 defaults
testpath 0.4.2 py37_0 defaults
I will recommend you that you uninstall the current version of anaconda that you have, when I downloaded the last version of anaconda i got some problems, I remenber that I could'nt install for example tensorflow or matplotlib..
The best version to work with tensorflow or matplotlib is having one anaconda with python 3.6. Try to install Anaconda3-4.4.0-Windows-x86_64 or Anaconda3-4.4.0-Linux-x86_64.sh which was released in 2017-05-26.
Anacoda versions
And then try to install tensorflow, matplotlib, pandas, numpy but before run
conda update conda
To update some packages of anaconda.
And you will install those the packages/libraries without problems,
Best Regards.
PD: I also tried to install docker however I got more problems than using python with pip, that's why I think anaconda is the best solution.

Categories