原问题:pip install fschat==0.2.35 失败
报错如下:是显示wavedrom安装时失败导致的
Collecting wavedrom (from markdown2[all]->fschat==0.2.35)
Downloading https://mirrors.cloud.tencent.com/pypi/packages/be/71/6739e3abac630540aaeaaece4584c39f88b5f8658ce6ca517efec455e3de/wavedrom-2.0.3.post3.tar.gz (137 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.7/137.7 kB 1.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [54 lines of output]
C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.
ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
ERROR: No matching distribution found for setuptools_scm
Traceback (most recent call last):
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\installer.py", line 101, in _fetch_build_egg_no_warn
subprocess.check_call(cmd)
File "C:\Users\image\.conda\envs\chatchat\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\image\\.conda\\envs\\chatchat\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\image\\AppData\\Local\\Temp\\tmpa4zkgf1k', '--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 "C:\Users\image\AppData\Local\Temp\pip-install-0ai4x1n2\wavedrom_5a45f60e6b2f4311a9a91e810b00a60a\setup.py", line 28, in <module>
setup(
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\__init__.py", line 102, in setup
_install_setup_requires(attrs)
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\__init__.py", line 75, in _install_setup_requires
_fetch_build_eggs(dist)
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\__init__.py", line 80, in _fetch_build_eggs
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\dist.py", line 636, in fetch_build_eggs
return _fetch_build_eggs(self, requires)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\pkg_resources\__init__.py", line 813, in resolve
dist = self._resolve_dist(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\pkg_resources\__init__.py", line 849, in _resolve_dist
dist = best[req.key] = env.best_match(
^^^^^^^^^^^^^^^
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\pkg_resources\__init__.py", line 1119, in best_match
return self.obtain(req, installer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\pkg_resources\__init__.py", line 1130, in obtain
return installer(requirement) if installer else None
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\image\.conda\envs\chatchat\Lib\site-packages\setuptools\installer.py", line 103, in _fetch_build_egg_no_warn
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['C:\\Users\\image\\.conda\\envs\\chatchat\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\image\\AppData\\Local\\Temp\\tmpa4zkgf1k', '--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