RuntimeError: PyPI no longer supports ‘pip search‘ (or XML-RPC search).

RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search).

1. ERROR: XMLRPC request failed

Deprecated Methods
https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods

PyPI XMLRPC Search Disabled
https://status.python.org/incidents/grk0k7sz6zkp

(base) yongqiang@yongqiang:~$ pip search scikit-learn
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.
(base) yongqiang@yongqiang:~$

Permanently deprecated and disabled due to excessive traffic driven by unidentified traffic, presumably automated.

由于未知流量驱动的流量过多 (可能是自动化的),因此永久弃用和禁用。

XMLRPC Search has been permanently disabled.

1.1. InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 0.23.1 when using version 1.3.2.

(base) yongqiang@yongqiang:~$ nn-meter predict --predictor cortexA76cpu_tflite21 --predictor-version 1.0 --tensorflow /home/yongqiang/yongqiang_work/nn-Meter/material/testmodels/mobilenetv3small_0.pb
(nn-Meter) checking local kernel predictors at /home/yongqiang/.nn_meter/data/predictor/cortexA76cpu_tflite21
(nn-Meter) load predictor /home/yongqiang/.nn_meter/data/predictor/cortexA76cpu_tflite21/dwconv-bn-relu.pkl
/home/yongqiang/miniconda3/lib/python3.11/site-packages/sklearn/base.py:348: InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 0.23.1 when using version 1.3.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(
Traceback (most recent call last):
  File "/home/yongqiang/miniconda3/bin/nn-meter", line 8, in <module>
    sys.exit(nn_meter_cli())
             ^^^^^^^^^^^^^^
  File "/home/yongqiang/miniconda3/lib/python3.11/site-packages/nn_meter/utils/nn_meter_cli/interface.py", line 266, in nn_meter_cli
    args.func(args)
  File "/home/yongqiang/miniconda3/lib/python3.11/site-packages/nn_meter/utils/nn_meter_cli/predictor.py", line 39, in apply_latency_predictor_cli
    predictor = load_latency_predictor(args.predictor, args.predictor_version)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yongqiang/miniconda3/lib/python3.11/site-packages/nn_meter/predictor/nn_meter_predictor.py", line 66, in load_latency_predictor
    kernel_predictors, fusionrule = loading_to_local(pred_info, os.path.join(user_data_folder, 'predictor'))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yongqiang/miniconda3/lib/python3.11/site-packages/nn_meter/predictor/utils.py", line 39, in loading_to_local
    model = pickle.load(f)
            ^^^^^^^^^^^^^^
  File "sklearn/tree/_tree.pyx", line 728, in sklearn.tree._tree.Tree.__setstate__
  File "sklearn/tree/_tree.pyx", line 1434, in sklearn.tree._tree._check_node_ndarray
ValueError: node array from the pickle has an incompatible dtype:
- expected: {'names': ['left_child', 'right_child', 'feature', 'threshold', 'impurity', 'n_node_samples', 'weighted_n_node_samples', 'missing_go_to_left'], 'formats': ['<i8', '<i8', '<i8', '<f8', '<f8', '<i8', '<f8', 'u1'], 'offsets': [0, 8, 16, 24, 32, 40, 48, 56], 'itemsize': 64}
- got     : [('left_child', '<i8'), ('right_child', '<i8'), ('feature', '<i8'), ('threshold', '<f8'), ('impurity', '<f8'), ('n_node_samples', '<i8'), ('weighted_n_node_samples', '<f8')]
(base) yongqiang@yongqiang:~$

1.2. pip uninstall scikit-learn

(base) yongqiang@yongqiang:~$ pip uninstall scikit-learn
Found existing installation: scikit-learn 1.3.2
Uninstalling scikit-learn-1.3.2:
  Would remove:
    /home/yongqiang/miniconda3/lib/python3.11/site-packages/scikit_learn-1.3.2.dist-info/*
    /home/yongqiang/miniconda3/lib/python3.11/site-packages/scikit_learn.libs/libgomp-a34b3233.so.1.0.0
    /home/yongqiang/miniconda3/lib/python3.11/site-packages/sklearn/*
Proceed (Y/n)? y
  Successfully uninstalled scikit-learn-1.3.2
(base) yongqiang@yongqiang:~$
(base) yongqiang@yongqiang:~$ pip search scikit-learn
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.
(base) yongqiang@yongqiang:~$

使用 conda search scikit-learn 替代 pip search scikit-learn

(base) yongqiang@yongqiang:~$ conda search scikit-learn
Loading channels: done
# Name                       Version           Build  Channel
scikit-learn                  0.19.0 py27_nomklh0ffebdf_2  anaconda/pkgs/main
scikit-learn                  0.19.0  py27hd893acb_2  anaconda/pkgs/main
scikit-learn                  0.19.0 py35_nomklh375dd1d_2  anaconda/pkgs/main
scikit-learn                  0.19.0  py35h25e8076_2  anaconda/pkgs/main
scikit-learn                  0.19.0 py36_nomklh41feb14_2  anaconda/pkgs/main
scikit-learn                  0.19.0  py36h97ac459_2  anaconda/pkgs/main
scikit-learn                  0.19.1 py27_nomklh6479e79_0  anaconda/pkgs/main
scikit-learn                  0.19.1 py27_nomklh6cfcb94_0  anaconda/pkgs/main
scikit-learn                  0.19.1  py27h445a80a_0  anaconda/pkgs/main
scikit-learn                  0.19.1  py27hedc7406_0  anaconda/pkgs/main
scikit-learn                  0.19.1 py35_nomklh26d41a3_0  anaconda/pkgs/main
scikit-learn                  0.19.1  py35hbf1f462_0  anaconda/pkgs/main
scikit-learn                  0.19.1 py36_nomklh27f7947_0  anaconda/pkgs/main
scikit-learn                  0.19.1 py36_nomklh6cfcb94_0  anaconda/pkgs/main
scikit-learn                  0.19.1  py36h7aa7ec6_0  anaconda/pkgs/main
scikit-learn                  0.19.1  py36hedc7406_0  anaconda/pkgs/main
scikit-learn                  0.19.1 py37_nomklh6cfcb94_0  anaconda/pkgs/main
scikit-learn                  0.19.1  py37hedc7406_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py27h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py27h4989274_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py35h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py35h4989274_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py36h4989274_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.19.2  py37h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py27h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py27h22eb022_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py27h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py27h4989274_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py35h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py35h22eb022_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py35h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py35h4989274_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py36h22eb022_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py36h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py36h4989274_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py37h22eb022_1  anaconda/pkgs/main
scikit-learn                  0.20.0  py37h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.0  py37h4989274_1  anaconda/pkgs/main
scikit-learn                  0.20.1  py27h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py27h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py27hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py36h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py37h4989274_0  anaconda/pkgs/main
scikit-learn                  0.20.1  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.2  py27h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.2  py27hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.2  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.2  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.2  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.2  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.3  py27h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.3  py27hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.3  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.3  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.20.3  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.20.3  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.1  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.1  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.1  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.1  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.1  py38h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.1  py38hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.2  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.2  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.2  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.2  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.3  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.3  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.21.3  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.21.3  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                    0.22  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                    0.22  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                    0.22  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                    0.22  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                    0.22  py38h22eb022_0  anaconda/pkgs/main
scikit-learn                    0.22  py38hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.22.1  py36h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.22.1  py36hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.22.1  py37h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.22.1  py37hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.22.1  py38h22eb022_0  anaconda/pkgs/main
scikit-learn                  0.22.1  py38hd81dba3_0  anaconda/pkgs/main
scikit-learn                  0.23.1  py36h423224d_0  anaconda/pkgs/main
scikit-learn                  0.23.1  py36h7ea95a0_0  anaconda/pkgs/main
scikit-learn                  0.23.1  py37h423224d_0  anaconda/pkgs/main
scikit-learn                  0.23.1  py37h7ea95a0_0  anaconda/pkgs/main
scikit-learn                  0.23.1  py38h423224d_0  anaconda/pkgs/main
scikit-learn                  0.23.1  py38h7ea95a0_0  anaconda/pkgs/main
scikit-learn                  0.23.2  py36h0573a6f_0  anaconda/pkgs/main
scikit-learn                  0.23.2  py37h0573a6f_0  anaconda/pkgs/main
scikit-learn                  0.23.2  py38h0573a6f_0  anaconda/pkgs/main
scikit-learn                  0.23.2  py39ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.1  py36ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.1  py37ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.1  py38ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.1  py39ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.2  py36ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.2  py37ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.2  py38ha9443f7_0  anaconda/pkgs/main
scikit-learn                  0.24.2  py39ha9443f7_0  anaconda/pkgs/main
scikit-learn                   1.0.1 py310h00e6091_0  anaconda/pkgs/main
scikit-learn                   1.0.1  py37h51133e4_0  anaconda/pkgs/main
scikit-learn                   1.0.1  py38h51133e4_0  anaconda/pkgs/main
scikit-learn                   1.0.1  py39h51133e4_0  anaconda/pkgs/main
scikit-learn                   1.0.2  py37h51133e4_0  anaconda/pkgs/main
scikit-learn                   1.0.2  py37h51133e4_1  anaconda/pkgs/main
scikit-learn                   1.0.2  py38h51133e4_0  anaconda/pkgs/main
scikit-learn                   1.0.2  py38h51133e4_1  anaconda/pkgs/main
scikit-learn                   1.0.2  py39h51133e4_0  anaconda/pkgs/main
scikit-learn                   1.0.2  py39h51133e4_1  anaconda/pkgs/main
scikit-learn                   1.1.1 py310h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.1  py38h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.1  py39h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.2 py310h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.2  py38h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.2  py39h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.3 py310h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.3 py310h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.1.3 py311h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.1.3  py38h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.3  py38h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.1.3  py39h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.1.3  py39h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.0 py310h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.0 py310h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.0  py38h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.0  py38h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.0  py39h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.0  py39h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.1 py310h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.1 py311h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.1  py38h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.1  py39h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.2 py310h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.2 py310h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.2 py311h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.2 py311h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.2  py38h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.2  py38h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.2.2  py39h6a678d5_0  anaconda/pkgs/main
scikit-learn                   1.2.2  py39h6a678d5_1  anaconda/pkgs/main
scikit-learn                   1.3.0 py310h1128e8f_0  anaconda/pkgs/main
scikit-learn                   1.3.0 py311ha02d727_0  anaconda/pkgs/main
scikit-learn                   1.3.0 py312h526ad5a_2  anaconda/pkgs/main
scikit-learn                   1.3.0  py38h1128e8f_0  anaconda/pkgs/main
scikit-learn                   1.3.0  py39h1128e8f_0  anaconda/pkgs/main
(base) yongqiang@yongqiang:~$

(base) yongqiang@yongqiang:~$ conda install scikit-learn==0.23.1
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using 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:

  - scikit-learn==0.23.1 -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']

Your python: python=3.11

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.

The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.31=0
  - feature:|@/linux-64::__glibc==2.31=0
  - scikit-learn==0.23.1 -> libgcc-ng[version='>=7.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.31


(base) yongqiang@yongqiang:~$

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/

[2] microsoft / nn-Meter, https://github.com/microsoft/nn-Meter

[3] nn-meter 2.0, https://pypi.org/project/nn-meter/

[4] nn-Meter: Towards Accurate Latency Prediction of Deep-Learning Model Inference on Diverse Edge Devices, https://air.tsinghua.edu.cn/pdf/nn-Meter-Towards-Accurate-Latency-Prediction-of-Deep-Learning-Model-Inference-on-Diverse-Edge-Devices.pdf

相关推荐
程序员洲洲5 个月前
【已解决】Python报错 RuntimeError: No CUDA GPUs are available
python·深度学习·gpu·cuda·runtimeerror