from setuptools import setup config = { 'name': 'ssms', 'version': '0.1', 'author': 'Noah Davis', 'packages': ['ssms'], 'package_dir': {'': 'src/main/python'}, 'author_email': 'noahdavis@gwu.edu', 'description': 'Perform strain measurements using computer vision.', 'entry_points': { 'console_scripts': ['ssms=ssms.cli:cli'] } } setup(**config)报错D:\software\anaconda\anaconda3\python.exe D:/work1/pycharmproject/ship-strain-measurement-system-main/setup.py Traceback (most recent call last): File "D:/work1/pycharmproject/ship-strain-measurement-system-main/setup.py", line 18, in <module> setup(**config) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\__init__.py", line 106, in setup _install_setup_requires(attrs) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\__init__.py", line 74, in _install_setup_requires dist = MinimalDistribution(attrs) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\__init__.py", line 56, in __init__ super().__init__(filtered) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\dist.py", line 494, in __init__ for ep in metadata.entry_points(group='distutils.setup_keywords'): File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\__init__.py", line 856, in entry_points return EntryPoints(eps).select(**params) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\__init__.py", line 854, in <genexpr> dist.entry_points for dist in _unique(distributions()) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\_itertools.py", line 16, in unique_everseen k = key(element) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\_py39compat.py", line 18, in normalized_name return dist._normalized_name File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\__init__.py", line 778, in _normalized_name or super()._normalized_name File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\__init__.py", line 445, in _normalized_name return Prepared.normalize(self.name) File "D:\software\anaconda\anaconda3\lib\site-packages\setuptools\_vendor\importlib_metadata\__init__.py", line 700, in normalize return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_') File "D:\software\anaconda\anaconda3\lib\re.py", line 192, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: expected string or bytes-like object Process finished with exit code 1
时间: 2023-06-30 19:19:34 浏览: 398
根据报错信息,看起来是 setuptools 的一个 bug 导致的问题。您可以尝试升级 setuptools 到最新版本来解决该问题。
您可以使用以下命令升级 setuptools:
```
pip install --upgrade setuptools
```
如果升级 setuptools 后问题仍然存在,请尝试清除 setuptools 缓存并重新安装它:
```
pip install --upgrade --no-cache-dir setuptools
```
如果以上方法还不能解决问题,您可以尝试升级 pip 到最新版本。您可以使用以下命令来升级 pip:
```
pip install --upgrade pip
```
然后再尝试重新安装 setuptools:
```
pip install setuptools
```
希望这些方法能够帮助您解决问题。
阅读全文