lm-sys / FastChat

An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.
Apache License 2.0
36.52k stars 4.5k forks source link

pip install fastchat error #333

Closed danerlt closed 1 year ago

danerlt commented 1 year ago

I used conda to create a Python 3.8 environment, The version information is as follows

(fschat) [root@gpu01]# conda -V
conda 23.1.0
(fschat) [root@gpu01]# pip -V
pip 23.0.1 from /root/anaconda3/envs/fschat/lib/python3.8/site-packages/pip (python 3.8)
(fschat) [root@gpu01]# python -V
Python 3.8.16

When I execute pip3 install fschat I get an error saying metadata-generation-failed, the detailed error message is as follows, How to solve this problem

pip3 install fschat -i http://10.113.75.115:3141/admin/pypi/+simple/  --trusted-host=10.113.75.115
Looking in indexes: http://10.113.75.115:3141/admin/pypi/+simple/
Collecting fschat
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/904/bea25caba6f11/fschat-0.1.9-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 kB 22.1 MB/s eta 0:00:00
Collecting markdown2[all]
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/7d4/9ca871d3e0e41/markdown2-2.4.8-py2.py3-none-any.whl (38 kB)
Collecting sentencepiece
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/923/ee4af16dbae1f/sentencepiece-0.1.97-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 681.3 kB/s eta 0:00:00
Collecting uvicorn
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/e47/cac98a6da10cd/uvicorn-0.21.1-py3-none-any.whl (57 kB)
Collecting numpy
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/2ea/bd64ddb96a123/numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 722.1 kB/s eta 0:00:00
Collecting accelerate
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/41a/84ac94407d7dc/accelerate-0.18.0-py3-none-any.whl (215 kB)
Collecting torch
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/ec5/fff2447663e36/torch-2.0.0-cp38-cp38-manylinux1_x86_64.whl (619.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 619.9/619.9 MB 740.7 kB/s eta 0:00:00
Collecting fastapi
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/daf/73bbe84418020/fastapi-0.95.0-py3-none-any.whl (57 kB)
Collecting tokenizers>=0.12.1
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/a0f/9b92ea0523051/tokenizers-0.13.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.8/7.8 MB 824.9 kB/s eta 0:00:00
Collecting wandb
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/99b/db40587c3300d/wandb-0.14.2-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 159.9 MB/s eta 0:00:00
Collecting requests
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/642/99f4909223da7/requests-2.28.2-py3-none-any.whl (62 kB)
Collecting gradio==3.23
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/1f6/37f80e4b74089/gradio-3.23.0-py3-none-any.whl (15.8 MB)
Collecting markupsafe
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/4cf/06cdc1dda9522/MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting orjson
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/6fa/3a26dcf0f5f29/orjson-3.8.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 271.4/271.4 kB 815.9 kB/s eta 0:00:00
Collecting huggingface-hub>=0.13.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/4d3/d40593de6673d/huggingface_hub-0.13.4-py3-none-any.whl (200 kB)
Collecting mdit-py-plugins<=0.3.3
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/36d/08a29def19ec4/mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)
Collecting ffmpy
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/757/591581eee25b4/ffmpy-0.3.0.tar.gz (4.8 kB)
  Preparing metadata (setup.py) ... done
Collecting websockets>=10.0
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/e03/9f106d48d3c24/websockets-11.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.0/130.0 kB 856.9 kB/s eta 0:00:00
Collecting pandas
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/977/326039bd1ded6/pandas-2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 679.2 kB/s eta 0:00:00
Collecting aiohttp
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/6dd/b2a2026c3f6a6/aiohttp-3.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 756.9 kB/s eta 0:00:00
Collecting altair>=4.2.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/8b4/5ebeaf8557f2d/altair-4.2.2-py3-none-any.whl (813 kB)
Collecting pyyaml
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/277/a0ef2981ca405/PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 701.2/701.2 kB 714.9 kB/s eta 0:00:00
Collecting pydantic
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/64d/34ab766fa056d/pydantic-1.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 856.2 kB/s eta 0:00:00
Collecting semantic-version
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/de7/8a3b8e0feda74/semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting pillow
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/f8f/c330c3370a81b/Pillow-9.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 799.5 kB/s eta 0:00:00
Collecting pydub
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/656/17e33033874b5/pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting python-multipart
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/ee6/98bab5ef148b0/python_multipart-0.0.6-py3-none-any.whl (45 kB)
Collecting httpx
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/a21/1fcce9b1254ea/httpx-0.23.3-py3-none-any.whl (71 kB)
Collecting fsspec
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/f39/8de9b49b14e9d/fsspec-2023.4.0-py3-none-any.whl (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 68.4 MB/s eta 0:00:00
Collecting aiofiles
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/931/2414ae06472eb/aiofiles-23.1.0-py3-none-any.whl (14 kB)
Collecting markdown-it-py[linkify]>=2.0.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/5a3/5f8d1870171d9/markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting matplotlib
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/4cf/327e98ecf08fc/matplotlib-3.7.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.2/9.2 MB 726.0 kB/s eta 0:00:00
Collecting jinja2
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/608/8930bfe239f0e/Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting typing-extensions
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/fb3/3085c39dd998a/typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting psutil
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/54c/0d3d8e0078b76/psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280 kB)
Collecting packaging>=20.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/714/ac14496c3e68c/packaging-23.0-py3-none-any.whl (42 kB)
Collecting nvidia-nccl-cu11==2.14.3
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/5e5/534257d1284b8/nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl (177.1 MB)
Collecting nvidia-cusparse-cu11==11.7.4.91
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/a33/89de714db6332/nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl (173.2 MB)
Collecting sympy
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/938/f984ee2b1e8ea/sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting nvidia-cublas-cu11==11.10.3.66
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/d32/e4d75f94ddfb9/nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
Collecting triton==2.0.0
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/9d4/978298b74fcf5/triton-2.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.2/63.2 MB 710.6 kB/s eta 0:00:00
Collecting nvidia-cuda-nvrtc-cu11==11.7.99
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/9f1/562822ea264b7/nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
Collecting nvidia-nvtx-cu11==11.7.91
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/b22/c64eee426a62f/nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl (98 kB)
Collecting nvidia-cufft-cu11==10.9.0.58
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/222/f9da70c803846/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl (168.4 MB)
Collecting nvidia-cuda-cupti-cu11==11.7.101
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/e0c/fd9854e1f2eda/nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl (11.8 MB)
Collecting nvidia-cudnn-cu11==8.5.0.96
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/402/f40adfc6f418f/nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
Collecting nvidia-cusolver-cu11==11.4.0.1
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/72f/a7261d755ed55/nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl (102.6 MB)
Collecting nvidia-cuda-runtime-cu11==11.7.99
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/cc7/68314ae58d264/nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
Collecting nvidia-curand-cu11==10.2.10.91
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/eec/b269c970fa599/nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl (54.6 MB)
Collecting filelock
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/f08/a52314748335c/filelock-3.11.0-py3-none-any.whl (10.0 kB)
Collecting networkx
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/4f3/3f68cb2afcf86/networkx-3.1-py3-none-any.whl (2.1 MB)
Requirement already satisfied: setuptools in /root/anaconda3/envs/fschat/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch->fschat) (65.6.3)
Requirement already satisfied: wheel in /root/anaconda3/envs/fschat/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch->fschat) (0.38.4)
Collecting cmake
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/19f/a3e457afecf28/cmake-3.26.1-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (24.0 MB)
Collecting lit
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/3c4/ac372122a1de4/lit-16.0.0.tar.gz (144 kB)
  Preparing metadata (setup.py) ... done
Collecting starlette<0.27.0,>=0.26.1
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/e87/fce5d7cbdde34/starlette-0.26.1-py3-none-any.whl (66 kB)
Collecting wavedrom
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/327/b4d5dca593c81/wavedrom-2.0.3.post3.tar.gz (137 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
      ERROR: No matching distribution found for setuptools_scm
      /root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/root/anaconda3/envs/fschat/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/root/anaconda3/envs/fschat/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6rk4i_yh', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-_i6rmmiv/wavedrom_afe34bd0db2c4427af272073cd43fba5/setup.py", line 28, in <module>
          setup(
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/root/anaconda3/envs/fschat/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6rk4i_yh', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
danerlt commented 1 year ago

OS Information:

(fschat) [root@gpu01]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

(fschat) [root@gpu01]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

(fschat) [root@gpu01]# uname -r
4.17.11-1.el7.elrepo.x86_64
danerlt commented 1 year ago

The GPU infomation:

(fschat) [root@gpu01 litao]# nvidia-smi 
Mon Apr 10 11:19:56 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.91.03    Driver Version: 460.91.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            Off  | 00000000:3B:00.0 Off |                    0 |
| N/A   25C    P8     8W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  Tesla T4            Off  | 00000000:AF:00.0 Off |                    0 |
| N/A   27C    P8     8W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   2  Tesla T4            Off  | 00000000:D8:00.0 Off |                    0 |
| N/A   27C    P8     8W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
Edinburgh020 commented 1 year ago

haven't meet this situation, but maybe this can help

pip install --upgrade pip setuptools wheel

https://stackoverflow.com/questions/64038673/could-not-build-wheels-for-which-use-pep-517-and-cannot-be-installed-directly

pilipala818 commented 1 year ago

I used conda to create a Python 3.8 environment, The version information is as follows

(fschat) [root@gpu01]# conda -V
conda 23.1.0
(fschat) [root@gpu01]# pip -V
pip 23.0.1 from /root/anaconda3/envs/fschat/lib/python3.8/site-packages/pip (python 3.8)
(fschat) [root@gpu01]# python -V
Python 3.8.16

When I execute pip3 install fschat I get an error saying metadata-generation-failed, the detailed error message is as follows, How to solve this problem

pip3 install fschat -i http://10.113.75.115:3141/admin/pypi/+simple/  --trusted-host=10.113.75.115
Looking in indexes: http://10.113.75.115:3141/admin/pypi/+simple/
Collecting fschat
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/904/bea25caba6f11/fschat-0.1.9-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 kB 22.1 MB/s eta 0:00:00
Collecting markdown2[all]
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/7d4/9ca871d3e0e41/markdown2-2.4.8-py2.py3-none-any.whl (38 kB)
Collecting sentencepiece
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/923/ee4af16dbae1f/sentencepiece-0.1.97-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 681.3 kB/s eta 0:00:00
Collecting uvicorn
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/e47/cac98a6da10cd/uvicorn-0.21.1-py3-none-any.whl (57 kB)
Collecting numpy
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/2ea/bd64ddb96a123/numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 722.1 kB/s eta 0:00:00
Collecting accelerate
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/41a/84ac94407d7dc/accelerate-0.18.0-py3-none-any.whl (215 kB)
Collecting torch
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/ec5/fff2447663e36/torch-2.0.0-cp38-cp38-manylinux1_x86_64.whl (619.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 619.9/619.9 MB 740.7 kB/s eta 0:00:00
Collecting fastapi
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/daf/73bbe84418020/fastapi-0.95.0-py3-none-any.whl (57 kB)
Collecting tokenizers>=0.12.1
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/a0f/9b92ea0523051/tokenizers-0.13.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.8/7.8 MB 824.9 kB/s eta 0:00:00
Collecting wandb
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/99b/db40587c3300d/wandb-0.14.2-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 159.9 MB/s eta 0:00:00
Collecting requests
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/642/99f4909223da7/requests-2.28.2-py3-none-any.whl (62 kB)
Collecting gradio==3.23
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/1f6/37f80e4b74089/gradio-3.23.0-py3-none-any.whl (15.8 MB)
Collecting markupsafe
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/4cf/06cdc1dda9522/MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting orjson
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/6fa/3a26dcf0f5f29/orjson-3.8.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (271 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 271.4/271.4 kB 815.9 kB/s eta 0:00:00
Collecting huggingface-hub>=0.13.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/4d3/d40593de6673d/huggingface_hub-0.13.4-py3-none-any.whl (200 kB)
Collecting mdit-py-plugins<=0.3.3
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/36d/08a29def19ec4/mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)
Collecting ffmpy
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/757/591581eee25b4/ffmpy-0.3.0.tar.gz (4.8 kB)
  Preparing metadata (setup.py) ... done
Collecting websockets>=10.0
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/e03/9f106d48d3c24/websockets-11.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.0/130.0 kB 856.9 kB/s eta 0:00:00
Collecting pandas
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/977/326039bd1ded6/pandas-2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 679.2 kB/s eta 0:00:00
Collecting aiohttp
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/6dd/b2a2026c3f6a6/aiohttp-3.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 756.9 kB/s eta 0:00:00
Collecting altair>=4.2.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/8b4/5ebeaf8557f2d/altair-4.2.2-py3-none-any.whl (813 kB)
Collecting pyyaml
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/277/a0ef2981ca405/PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 701.2/701.2 kB 714.9 kB/s eta 0:00:00
Collecting pydantic
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/64d/34ab766fa056d/pydantic-1.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 856.2 kB/s eta 0:00:00
Collecting semantic-version
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/de7/8a3b8e0feda74/semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting pillow
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/f8f/c330c3370a81b/Pillow-9.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 799.5 kB/s eta 0:00:00
Collecting pydub
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/656/17e33033874b5/pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting python-multipart
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/ee6/98bab5ef148b0/python_multipart-0.0.6-py3-none-any.whl (45 kB)
Collecting httpx
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/a21/1fcce9b1254ea/httpx-0.23.3-py3-none-any.whl (71 kB)
Collecting fsspec
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/f39/8de9b49b14e9d/fsspec-2023.4.0-py3-none-any.whl (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 68.4 MB/s eta 0:00:00
Collecting aiofiles
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/931/2414ae06472eb/aiofiles-23.1.0-py3-none-any.whl (14 kB)
Collecting markdown-it-py[linkify]>=2.0.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/5a3/5f8d1870171d9/markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting matplotlib
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/4cf/327e98ecf08fc/matplotlib-3.7.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.2/9.2 MB 726.0 kB/s eta 0:00:00
Collecting jinja2
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/608/8930bfe239f0e/Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting typing-extensions
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/fb3/3085c39dd998a/typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting psutil
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/54c/0d3d8e0078b76/psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280 kB)
Collecting packaging>=20.0
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/714/ac14496c3e68c/packaging-23.0-py3-none-any.whl (42 kB)
Collecting nvidia-nccl-cu11==2.14.3
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/5e5/534257d1284b8/nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl (177.1 MB)
Collecting nvidia-cusparse-cu11==11.7.4.91
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/a33/89de714db6332/nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl (173.2 MB)
Collecting sympy
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/938/f984ee2b1e8ea/sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting nvidia-cublas-cu11==11.10.3.66
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/d32/e4d75f94ddfb9/nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
Collecting triton==2.0.0
  Downloading http://10.113.75.115:3141/root/pypi/%2Bf/9d4/978298b74fcf5/triton-2.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.2/63.2 MB 710.6 kB/s eta 0:00:00
Collecting nvidia-cuda-nvrtc-cu11==11.7.99
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/9f1/562822ea264b7/nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
Collecting nvidia-nvtx-cu11==11.7.91
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/b22/c64eee426a62f/nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl (98 kB)
Collecting nvidia-cufft-cu11==10.9.0.58
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/222/f9da70c803846/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl (168.4 MB)
Collecting nvidia-cuda-cupti-cu11==11.7.101
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/e0c/fd9854e1f2eda/nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl (11.8 MB)
Collecting nvidia-cudnn-cu11==8.5.0.96
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/402/f40adfc6f418f/nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
Collecting nvidia-cusolver-cu11==11.4.0.1
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/72f/a7261d755ed55/nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl (102.6 MB)
Collecting nvidia-cuda-runtime-cu11==11.7.99
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/cc7/68314ae58d264/nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
Collecting nvidia-curand-cu11==10.2.10.91
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/eec/b269c970fa599/nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl (54.6 MB)
Collecting filelock
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/f08/a52314748335c/filelock-3.11.0-py3-none-any.whl (10.0 kB)
Collecting networkx
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/4f3/3f68cb2afcf86/networkx-3.1-py3-none-any.whl (2.1 MB)
Requirement already satisfied: setuptools in /root/anaconda3/envs/fschat/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch->fschat) (65.6.3)
Requirement already satisfied: wheel in /root/anaconda3/envs/fschat/lib/python3.8/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch->fschat) (0.38.4)
Collecting cmake
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/19f/a3e457afecf28/cmake-3.26.1-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (24.0 MB)
Collecting lit
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/3c4/ac372122a1de4/lit-16.0.0.tar.gz (144 kB)
  Preparing metadata (setup.py) ... done
Collecting starlette<0.27.0,>=0.26.1
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/e87/fce5d7cbdde34/starlette-0.26.1-py3-none-any.whl (66 kB)
Collecting wavedrom
  Using cached http://10.113.75.115:3141/root/pypi/%2Bf/327/b4d5dca593c81/wavedrom-2.0.3.post3.tar.gz (137 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/setuptools-scm/
      ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
      ERROR: No matching distribution found for setuptools_scm
      /root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/root/anaconda3/envs/fschat/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/root/anaconda3/envs/fschat/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6rk4i_yh', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-_i6rmmiv/wavedrom_afe34bd0db2c4427af272073cd43fba5/setup.py", line 28, in <module>
          setup(
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/root/anaconda3/envs/fschat/lib/python3.8/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/root/anaconda3/envs/fschat/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6rk4i_yh', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

pip install --use-pep517 fschat

danerlt commented 1 year ago

@pilipala818 Thank you, very perfect solution to my problem.

ppsmk388 commented 6 months ago

@pilipala818 Thank you so much!

FlorientHuang commented 5 months ago

@pilipala818 nice, thanks bro