pio安装aiohttp失败,奇怪的是AttributeError _dep_map

问题描述 投票:1回答:1

我正在尝试在Python 3.7 virtualenv上安装aiohttp。当尝试安装AttributeError依赖时,它失败了奇怪的yarl

$ pip install aiohttp

Collecting aiohttp                         
  Using cached https://files.pythonhosted.org/packages/33/60/c21acb7002110699761d3dec36fad3f5087c2752a4eb495444f877db6
553/aiohttp-3.5.4-cp37-cp37m-manylinux1_x86_64.whl                                                                    
Collecting multidict<5.0,>=4.0 (from aiohttp)     
  Downloading https://files.pythonhosted.org/packages/88/f0/4d4cbd1a3744e3985efa49682352d0703df653ffa76b81f10fed86599a
50/multidict-4.5.2-cp37-cp37m-manylinux1_x86_64.whl (309kB)                                                           
    100% |████████████████████████████████| 317kB 65.0MB/s
Collecting attrs>=17.3.0 (from aiohttp)                                                                               
  Using cached https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a
514/attrs-18.2.0-py2.py3-none-any.whl     
Requirement already satisfied: async-timeout<4.0,>=3.0 in /fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site
-packages (from aiohttp) (3.0.1)
Requirement already satisfied: chardet<4.0,>=2.0 in /fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packa
ges (from aiohttp) (3.0.4)                                              
Collecting yarl<2.0,>=1.0 (from aiohttp)
  Downloading https://files.pythonhosted.org/packages/fb/84/6d82f6be218c50b547aa29d0315e430cf8a23c52064c92d0a8377d7b7357/yarl-1.3.0.tar.gz (159kB)
    100% |████████████████████████████████| 163kB 87.1MB/s
    Complete output from command python setup.py egg_info:                                                            
    Traceback (most recent call last):
      File "<string>", line 1, in <module>    
      File "/tmp/pip-install-od3qiiy3/yarl/setup.py", line 102, in <module>                                           
        setup(**args)          
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/__init__.py", line 142, i
n setup                                                                                                               
        _install_setup_requires(attrs)            
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/__init__.py", line 131, i
n _install_setup_requires   
        (k, v) for k, v in attrs.items()      
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/dist.py", line 442, in __
init__                                                                                        
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__                                              
        self.finalize_options()              
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/dist.py", line 600, in fi
nalize_options                                                                                                        
        ep.require(installer=self.fetch_build_egg)
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/pkg_resources/__init__.py", line 236
7, in require                                                                                 
        reqs = self.dist.requires(self.extras)
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/pkg_resources/__init__.py", line 263
5, in requires                                                             
        dm = self._dep_map
      File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/pkg_resources/__init__.py", line 269
1, in __getattr__           
        raise AttributeError(attr)                        
    AttributeError: _dep_map                                                                                          

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-od3qiiy3/yarl/

我试图在github中为aiohttpyarl寻找记录的问题,但没有发现任何类型。

还尝试安装稍微旧版本的yarl(1.0,1.1,1.2),但也没有太多运气。

知道这个错误的原因是什么?

python pip python-3.7 aiohttp
1个回答
2
投票

setuptools升级pip install -U setuptools解决了这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.