安装 Ray 时出现 Python PIP 问题 - 车轮包不可用

时间:2021-03-10 18:17:33

标签: python pip

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

完成

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

Python 版本:3.8.7

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

这是堆栈跟踪

 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 的任何已知问题?

1 个答案:

答案 0 :(得分:0)

我也有过类似的错误,不过是 gpustat 对 pytest-runner 的要求造成的。

运行 pip install pytest-runner 为我修复了它。只是分享以防其他人遇到此问题。

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