Server response (410): Gone (This API has been deprecated and removed from legacy PyPI解决方法

本文介绍了一种在尝试向PyPI注册或上传包时遇到的410错误,并提供了详细的解决方案,包括更改文件名以避免冲突。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述:

通过命令行窗口向PyPI注册时,出现报错:
Server response (410): Gone (This API has been deprecated and removed from legacy PyPI in favor of using the APIs available in the new PyPI.org implementation of PyPI (located at https://pypi.org/). For more information about migrating your use of this API to PyPI.org, please see https://packaging.python.org/guides/migrating-to-pypi-org/#uploading. For more information about the sunsetting of this API, please see https://mail.python.org/pipermail/distutils-sig/2017-June/030766.html)
如图:
这里写图片描述

问题原因:

使用的文件名被他人占用

解决方法:

更改文件名,使用一个没被占用的文件名

参考资料:https://stackoverflow.com/questions/45445760/twine-wont-let-me-register-or-upload-my-package-is-https-upload-pypi-org-leg

(rdt) qfw@LAPTOP-IQ27EG3H:~/RoboticsDiffusionTransformer$ pip install flash-attn --no-build-isolation Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting flash-attn Downloading https://pypi.tuna.tsinghua.edu.cn/packages/11/34/9bf60e736ed7bbe15055ac2dab48ec67d9dbd088d2b4ae318fd77190ab4e/flash_attn-2.7.4.post1.tar.gz (6.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 8.2 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Requirement already satisfied: torch in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from flash-attn) (2.1.0) Collecting einops (from flash-attn) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/87/62/9773de14fe6c45c23649e98b83231fffd7b9892b6cf863251dc2afa73643/einops-0.8.1-py3-none-any.whl (64 kB) Requirement already satisfied: filelock in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (3.18.0) Requirement already satisfied: typing-extensions in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (4.13.2) Requirement already satisfied: sympy in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (1.14.0) Requirement already satisfied: networkx in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (3.4.2) Requirement already satisfied: jinja2 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (3.1.6) Requirement already satisfied: fsspec in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (2025.3.2) Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.1.105 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (12.1.105) Requirement already satisfied: nvidia-cuda-runtime-cu12==12.1.105 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (12.1.105) Requirement already satisfied: nvidia-cuda-cupti-cu12==12.1.105 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (12.1.105) Requirement already satisfied: nvidia-cudnn-cu12==8.9.2.26 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (8.9.2.26) Requirement already satisfied: nvidia-cublas-cu12==12.1.3.1 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (12.1.3.1) Requirement already satisfied: nvidia-cufft-cu12==11.0.2.54 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (11.0.2.54) Requirement already satisfied: nvidia-curand-cu12==10.3.2.106 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (10.3.2.106) Requirement already satisfied: nvidia-cusolver-cu12==11.4.5.107 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (11.4.5.107) Requirement already satisfied: nvidia-cusparse-cu12==12.1.0.106 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (12.1.0.106) Requirement already satisfied: nvidia-nccl-cu12==2.18.1 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (2.18.1) Requirement already satisfied: nvidia-nvtx-cu12==12.1.105 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (12.1.105) Requirement already satisfied: triton==2.1.0 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from torch->flash-attn) (2.1.0) Requirement already satisfied: nvidia-nvjitlink-cu12 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch->flash-attn) (12.9.41) Requirement already satisfied: MarkupSafe>=2.0 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from jinja2->torch->flash-attn) (3.0.2) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages (from sympy->torch->flash-attn) (1.3.0) Building wheels for collected packages: flash-attn DEPRECATION: Building &#39;flash-attn&#39; using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of &#39;flash-attn&#39;. Discussion can be found at https://github.com/pypa/pip/issues/6334 Building wheel for flash-attn (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output] torch.__version__ = 2.1.0+cu121 /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages/setuptools/__init__.py:94: _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) /home/qfw/miniconda3/envs/rdt/lib/python3.10/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: BSD License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel Guessing wheel URL: https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl error: Remote end closed connection without response [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for flash-attn Running setup.py clean for flash-attn Failed to build flash-attn ERROR: Failed to build installable wheels for some pyproject.toml based projects (flash-attn)遇到这个问题怎么解决
05-12
pip install PyQt5 -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting PyQt5 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0e/07/c9ed0bd428df6f87183fca565a79fee19fa7c88c7f00a7f011ab4379e77a/PyQt5-5.15.11.tar.gz (3.2 MB) ---------------------------------------- 3.2/3.2 MB 22.3 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [32 lines of output] pyproject.toml: line 14: the legacy use of &#39;license&#39; is deprecated and will be removed in SIP v7.0.0, use an SPDX license expression and &#39;license-files&#39; instead Traceback (most recent call last): File "C:\Users\zyj\AppData\Local\Programs\Python\Python313-arm64\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module> main() ~~~~^^ File "C:\Users\zyj\AppData\Local\Programs\Python\Python313-arm64\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zyj\AppData\Local\Programs\Python\Python313-arm64\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 178, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "C:\Users\zyj\AppData\Local\Temp\pip-build-env-kednjopm\overlay\Lib\site-packages\sipbuild\api.py", line 28, in build_wheel project = AbstractProject.bootstrap(&#39;wheel&#39;, arguments=_convert_config_settings(config_settings)) File "C:\Users\zyj\AppData\Local\Temp\pip-build-env-kednjopm\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 74, in bootstrap project.setup(pyproject, tool, tool_description) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zyj\AppData\Local\Temp\pip-build-env-kednjopm\overlay\Lib\site-packages\sipbuild\project.py", line 633, in setup self.apply_user_defaults(tool) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "C:\Users\zyj\AppData\Local\Temp\pip-install-qjwtdgql\pyqt5_2636d2cf90e949858dba818752d415ce\project.py", line 68, in apply_user_defaults super().apply_user_defaults(tool) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "C:\Users\zyj\AppData\Local\Temp\pip-build-env-kednjopm\overlay\Lib\site-packages\pyqtbuild\project.py", line 51, in apply_user_defaults super().apply_user_defaults(tool) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "C:\Users\zyj\AppData\Local\Temp\pip-build-env-kednjopm\overlay\Lib\site-packages\sipbuild\project.py", line 243, in apply_user_defaults self.builder.apply_user_defaults(tool) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "C:\Users\zyj\AppData\Local\Temp\pip-build-env-kednjopm\overlay\Lib\site-packages\pyqtbuild\builder.py", line 49, in apply_user_defaults raise PyProjectOptionException(&#39;qmake&#39;, "specify a working qmake or add it to PATH") sipbuild.pyproject.PyProjectOptionException [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.
最新发布
07-30
(Log) PS D:\Project\Y\project\GraphLogAD-main\GraphLogAD-main> pip install torch_scatter Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting torch_scatter Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f5/ab/2a44ecac0f891dd0d765fc59ac8d277c6283a31907626560e72685df2ed6/torch_scatter-2.1.2.tar.gz (108 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: torch_scatter DEPRECATION: Building &#39;torch_scatter&#39; using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized b uild interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of &#39;torch_scatter&#39;. Discussion can be found at https://github.com/pypa/pip/issues/6334 Building wheel for torch_scatter (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [44 lines of output] C:\Users\23833\.conda\envs\Log\lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() running bdist_wheel running build running build_py creating build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\placeholder.py -> build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\scatter.py -> build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\segment_coo.py -> build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\segment_csr.py -> build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\testing.py -> build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\utils.py -> build\lib.win-amd64-cpython-310\torch_scatter copying torch_scatter\__init__.py -> build\lib.win-amd64-cpython-310\torch_scatter creating build\lib.win-amd64-cpython-310\torch_scatter\composite copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-cpython-310\torch_scatter\composite copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-cpython-310\torch_scatter\composite copying torch_scatter\composite\std.py -> build\lib.win-amd64-cpython-310\torch_scatter\composite copying torch_scatter\composite\__init__.py -> build\lib.win-amd64-cpython-310\torch_scatter\composite running egg_info writing torch_scatter.egg-info\PKG-INFO writing dependency_links to torch_scatter.egg-info\dependency_links.txt writing requirements to torch_scatter.egg-info\requires.txt writing top-level names to torch_scatter.egg-info\top_level.txt reading manifest file &#39;torch_scatter.egg-info\SOURCES.txt&#39; reading manifest template &#39;MANIFEST.in&#39; warning: no previously-included files matching &#39;*&#39; found under directory &#39;test&#39; adding license file &#39;LICENSE&#39; writing manifest file &#39;torch_scatter.egg-info\SOURCES.txt&#39; running build_ext C:\Users\23833\.conda\envs\Log\lib\site-packages\torch\utils\cpp_extension.py:382: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 warnings.warn(f&#39;Error checking compiler version for {compiler}: {error}&#39;) building &#39;torch_scatter._scatter_cpu&#39; extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for torch_scatter Running setup.py clean for torch_scatter Failed to build torch_scatter ERROR: Failed to build installable wheels for some pyproject.toml based projects (torch_scatter)
06-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值