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
Related
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
I am trying to download the blat package so that I can use the GAMMA program to analyze mutations in some sequences. I have bioconda install and I am using one-liner code to download blat described here: https://shanguangyu.com/articles/install-blat-on-mac-with-one-liner-command/
I think the issue could be that blat is not made for M1 macs. I previously had it installed on an older mac but I don't remember how I did that. I am a beginner/proficient coder so it could be an obvious error. Any help is appreciated.
Here is my code:
conda install -c bioconda blat
Here is my 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:
- blat
Current channels:
- https://conda.anaconda.org/bioconda/osx-arm64
- https://conda.anaconda.org/bioconda/noarch
- https://conda.anaconda.org/conda-forge/osx-arm64
- 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
You got to the root of the issue. M1 Macs use an ARM64-based architecture as opposed to x64. The website for blat does not list ARM compatibility, and, addressing the M1 specifically, a quick examination of the last update to the files shows that they predate the launch of the Apple Silicon Macs, just like the website you got the command from. Anaconda itself added support for ARM64 only recently. x64 translation does exist for macOS apps, but I don't think I've heard of one for blat.
From post update
This seems to be a common issue for Python users on new M1 macs. Many python packages are not made for ARM chips
This is solved by downloading homebrew and miniforge and using this code:
CONDA_SUBDIR=osx-64 conda create -n [environment] # create a new environment
conda activate [environment]
conda env config vars set CONDA_SUBDIR=osx-64 # subsequent commands use intel packages
https://naolin.medium.com/conda-on-m1-mac-with-miniforge-bbc4e3924f2b
https://towardsdatascience.com/using-conda-on-an-m1-mac-b2df5608a141
https://github.com/Haydnspass/miniforge#rosetta-on-mac-with-apple-silicon-hardware
(base) C:\Users\Lenovo>conda install -c menpo dlib
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.|
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- dlib -> python[version='2.7.*|3.4.*|3.5.*']
Your python: python=3.7
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
I did not find a solution to this problem yet. Heeeelppp, i tried both creating a new virtualenv into which install an older version of python (ex 3.5) and run the command pip install quast, but it doesn't work.
I wanna use some libraries such as DLIB, opencv, tensorflow and tesseract for computer vision...
I have made multiple attempts but can't find a fix to the following. This is being done with Anaconda.
conda install pyttsx
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:
- pyttsx
Current channels:
- https://repo.anaconda.com/pkgs/main/win-32
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-32
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-32
- 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.
If you search for a package name on anaconda.org you can find out what channel(s) it is available on (which may not be in the default anaconda channel). In this case:
$ conda install -c auto pyttsx
See https://anaconda.org/auto/pyttsx
I should add: It appears this package has not been updated in over 6 years, and is only available for Python 2.7. So you should consider whether it is a good idea to use it and if there isn't a better, currently maintained alternative.
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.