安装控制盘软件包时Python PIP问题不可用

2024-10-04 11:32:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试安装Ray-这可以通过一个简单的pip install ray来完成

在安装过程中,软件包会被下载并正确安装,直到它达到gpustat

Python版本:3.8.7

操作系统:Linux(更具体地说是cflinuxfs3)

这是stacktrace

 Downloading https://masked-package-path/packages/packages/b4/69/gpustat-0.6.0.tar.gz (78 kB)
       ERROR: Command errored out with exit status 1:
        command: /tmp/contents295671398/deps/0/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-tdlwfmx8/gpustat/setup.py'"'"'; __file__='"'"'/tmp/pip-install-tdlwfmx8/gpustat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4yij8vu9
            cwd: /tmp/pip-install-tdlwfmx8/gpustat/
       Complete output (22 lines):
       WARNING: The wheel package is not available.
       Traceback (most recent call last):
         File "<string>", line 1, in <module>
         File "/tmp/pip-install-tdlwfmx8/gpustat/setup.py", line 91, in <module>
           setup(
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/setuptools/__init__.py", line 164, in setup
           _install_setup_requires(attrs)
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/setuptools/__init__.py", line 159, in _install_setup_requires
           dist.fetch_build_eggs(dist.setup_requires)
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/setuptools/dist.py", line 699, in fetch_build_eggs
           resolved_dists = pkg_resources.working_set.resolve(
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/pkg_resources/__init__.py", line 779, in resolve
           dist = best[req.key] = env.best_match(
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1064, in best_match
           return self.obtain(req, installer)
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1076, in obtain
           return installer(requirement)
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
           return fetch_build_egg(self, req)
         File "/tmp/contents295671398/deps/0/python/lib/python3.8/site-packages/setuptools/installer.py", line 83, in fetch_build_egg
           raise DistutilsError('the `allow-hosts` option is not supported '
       distutils.errors.DistutilsError: the `allow-hosts` option is not supported when using pip to install requirements.
       ----------------------------------------
   ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
   **ERROR** Could not install pip packages: could not run pip: exit status 1

另外,我尝试安装wheel(因为警告说它丢失了),但没有成功

关于gpustat-0.6.0的任何已知问题


Tags: installpipdepsinpyegglibpackages
1条回答
网友
1楼 · 发布于 2024-10-04 11:32:00

我有一个类似的错误,但它是由gpustat对pytestrunner的要求引起的

运行pip install pytest-runner为我修复了它。只是分享,以防其他人有这个问题

注意:这是通过公司代理完成的

相关问题 更多 >