linux 无法在远程服务器上安装sklearn==1.1.2

33qvvth1  于 2023-06-29  发布在  Linux
关注(0)|答案(1)|浏览(180)

apolloadmin@apollo-nginxlb-scale-vm:/home/reportsdeploy/Automation/Jenkins/python_scripts/Sruthi$ python model_v4_deploy.py /home/apolloadmin/.local/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator ExtraTreeRegressor from version 1.2.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk. UserWarning) /home/apolloadmin/.local/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator IsolationForest from version 1.2.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk. UserWarning) /home/apolloadmin/.local/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator StandardScaler from version 1.2.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk. UserWarning) Traceback (most recent call last): File "model_v4_deploy.py", line 242, in users_today['pred']=loaded_model.predict(loaded_scaler.transform(users_today.drop('mobilenumber',axis=1).fillna(0))) File "/home/apolloadmin/.local/lib/python3.6/site-packages/sklearn/ensemble/iforest.py", line 314, in predict is_inlier[self.decision_function(X) < 0] = -1 File "/home/apolloadmin/.local/lib/python3.6/site-packages/sklearn/ensemble/iforest.py", line 347, in decision_function return self.score_samples(X) - self.offset File "/home/apolloadmin/.local/lib/python3.6/site-packages/sklearn/ensemble/iforest.py", line 379, in score_samples if self.n_features != X.shape[1]: AttributeError: 'IsolationForest' object has no attribute 'n_features' apolloadmin@apollo-nginxlb-scale-vm:/home/reportsdeploy/Automation/Jenkins/python_scripts/Sruthi$ pip install sklearn Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: sklearn in /home/apolloadmin/.local/lib/python3.6/site-packages (0.0.post1) apolloadmin@apollo-nginxlb-scale-vm:/home/reportsdeploy/Automation/Jenkins/python_scripts/Sruthi$ pip install scikit-learn 1.2.2 Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: scikit-learn in /home/apolloadmin/.local/lib/python3.6/site-packages (0.24.2) ERROR: Could not find a version that satisfies the requirement 1.2.2 (from versions: none) ERROR: No matching distribution found for 1.2.2 apolloadmin@apollo-nginxlb-scale-vm:/home/reportsdeploy/Automation/Jenkins/python_scripts/Sruthi$ pip install scikit-learn==1.2.2 Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement scikit-learn==1.2.2 (from versions: 0.9, 0.10, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.14, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.17, 0.17.1, 0.18, 0.18.1, 0.18.2, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22, 0.22.1, 0.22.2, 0.22.2.post1, 0.23.0, 0.23.1, 0.23.2, 0.24.0, 0.24.1, 0.24.2) ERROR: No matching distribution found for scikit-learn==1.2.2
Why might this be , how to fix this?

j91ykkif

j91ykkif1#

看起来你使用的是python 3.6,但sklearn 1.2.2需要python >=3.8link)。
你可以使用sklearn 0.24.2,或者需要使用python >=3.8。

相关问题