ray-project / tune-sklearn

A drop-in replacement for Scikit-Learn’s GridSearchCV / RandomizedSearchCV -- but with cutting edge hyperparameter tuning techniques.
https://docs.ray.io/en/master/tune/api_docs/sklearn.html
Apache License 2.0
465 stars 52 forks source link

Installing does not work on python 3.9 #169

Open Filco306 opened 3 years ago

Filco306 commented 3 years ago

Hello,

I currently cannot install this package when I use the pip installment.

I have tried both ways of installing, and I get:

pip3 install tune-sklearn ray[tune]
ERROR: Could not find a version that satisfies the requirement ray[tune]
ERROR: No matching distribution found for ray[tune]
pip3 install -U git+https://github.com/ray-project/tune-sklearn.git && pip3 install 'ray[tune]'
Collecting git+https://github.com/ray-project/tune-sklearn.git
  Cloning https://github.com/ray-project/tune-sklearn.git to /private/var/folders/g4/2rh0j8g948b6vps252ckmk1w0000gn/T/pip-req-build-lfi_20kv
Requirement already satisfied: scipy in /usr/local/lib/python3.9/site-packages (from tune-sklearn==0.2.0) (1.5.4)
ERROR: Could not find a version that satisfies the requirement ray[tune] (from tune-sklearn)
ERROR: No matching distribution found for ray[tune]

My python3 version:

>> import sys
>> print(sys.version)
3.9.0 (default, Dec  6 2020, 18:02:34) 
[Clang 12.0.0 (clang-1200.0.32.27)]

Would you perhaps know what is wrong? Thank you very much!

richardliaw commented 3 years ago

Yeah! It's because one of the core dependencies (Ray) currently doesn't work on 3.9. I've brought this up with the team and there's currently ongoing work (expect to be available in January!)

Filco306 commented 3 years ago

Okay awesome, thank you very much! :D Leaving this open until then in that case ;)

Filco306 commented 3 years ago

Working now! Closing this!

Miladiouss commented 3 years ago

I still have this issue. pip install -U ray says ERROR: No matching distribution found for ray

richardliaw commented 3 years ago

What version of pip are you using @Miladiouss ?

Miladiouss commented 3 years ago

@richardliaw

pip                       21.0.1           py39h06a4308_0  
python                    3.9.4                hdb3f193_0  
Miladiouss commented 3 years ago

Btw, I'm using Ubuntu 20.

lindu2770 commented 3 years ago

same error here pip 21.1.1 Python 3.8.8

richardliaw commented 3 years ago

@Miladiouss I'll just keep this open - we don't have 3.9 support for Ray yet.

@lindu2770 not sure why you're seeing this error...

Miladiouss commented 3 years ago

Thanks @richardliaw, for reference for others, I had to go to Python 3.7 to install ray.

LasithEranga commented 2 years ago

Thanks @Miladiouss Python 3.7 worked for me as well.

koaning commented 2 years ago

When I go to https://pypi.org/project/ray/#history then I see the following versions supported:

image

If 3.9 is not supported yet, maybe the version mentioned should be removed.

hannahbus commented 2 years ago

I encountered the same issue with Python 3.10, which is supported by Ray 1.12.1 according to the setup.py. The error was ERROR: Could not find a version that satisfies the requirement ray (from versions: none) ERROR: No matching distribution found for ray

deifactor commented 2 years ago

I suspect this is because ray doesn't publish sdists, only wheels, and everyone getting bitten by this is running ARM64 Linux (either directly or by running it in Docker inside an M1 laptop), which Ray doesn't publish any wheels for. It has nothing to do with the Python version. You can see this from the fact that installation fails on 3.7 with aarch64, but succeeds on 3.7 with amd64.

❯ docker run --rm -it --entrypoint bash python:3.7
root@04c16f477698:/# python --version
Python 3.7.13
root@04c16f477698:/# uname -m
aarch64
root@04c16f477698:/# pip install ray
ERROR: Could not find a version that satisfies the requirement ray (from versions: none)
ERROR: No matching distribution found for ray
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@04c16f477698:/#
exit

vs.

❯ docker run --platform linux/amd64 --rm -it --entrypoint bash python:3.7
root@f620159b1b80:/# python --version
Python 3.7.13
root@f620159b1b80:/# uname -m
x86_64
root@f620159b1b80:/# pip install ray
[a successful install]
risboo6909 commented 2 years ago

@deifactor Thanks for the hint! Had the similar issue, fixed it by switching from aarch64 to amd64.

66Gramms commented 2 years ago

This is still a problem on windows 10 on python 3.10

GLGDLY commented 2 years ago

For me, problem solved with directly pip installing .whl from https://docs.ray.io/en/latest/ray-overview/installation.html which I am py3.10 on win10, just for reference image

AndreMPCosta commented 2 years ago

For me, problem solved with directly pip installing .whl from https://docs.ray.io/en/latest/ray-overview/installation.html which I am py3.10 on win10, just for reference image

@GLGDLY Can you give the link for the wheels? I can't find those.

GLGDLY commented 2 years ago

For me, problem solved with directly pip installing .whl from https://docs.ray.io/en/latest/ray-overview/installation.html which I am py3.10 on win10, just for reference image

@GLGDLY Can you give the link for the wheels? I can't find those.

linux: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl

macos: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-macosx_10_15_universal2.whl

Windows: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-win_amd64.whl

just change the version in the url to get wheels for other python versions, such as: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-win_amd64.whl

Vasiliy-b commented 1 year ago

ERROR: Could not find a version that satisfies the requirement ray[default,tune]>=2.0.0 (from finrl) (from versions: none) ERROR: No matching distribution found for ray[default,tune]>=2.0.0

Trying with py 3.9, 3.10.5 and few other. On win 11. Tried as well directly pip installing .whl Nothing seems to help.

I am not experienced with python. fyi.

salmanea commented 1 year ago

On Python 3.11 and it does not install either.

Gustinouz commented 1 year ago

For me, problem solved with directly pip installing .whl from https://docs.ray.io/en/latest/ray-overview/installation.html which I am py3.10 on win10, just for reference image

@GLGDLY Can you give the link for the wheels? I can't find those.

linux: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl

macos: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-macosx_10_15_universal2.whl

Windows: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-win_amd64.whl

just change the version in the url to get wheels for other python versions, such as: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-win_amd64.whl

tried this but still have errors ERROR: Could not find a version that satisfies the requirement ray-3.0.0.dev0-cp310-cp310-win_amd64 (from versions: none) ERROR: No matching distribution found for ray-3.0.0.dev0-cp310-cp310-win_amd64

dss010101 commented 1 year ago

well..im getting this error today trying to rebuild my container... guessing it's related to python 3.12 bump with the image im using