Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/q2/n_1xnt8x3b...

执行:pip3.6 install pylint

Collecting pylint
  Downloading https://files.pythonhosted.org/packages/fb/13/519c1264a134beab2be4bac8dd3e64948980a5ca7833b31cf0255b21f20a/pylint-2.6.0-py3-none-any.whl (325kB)
    100% |████████████████████████████████| 327kB 1.0MB/s 
Collecting mccabe<0.7,>=0.6 (from pylint)
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Requirement already satisfied: toml>=0.7.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pylint)
Collecting isort<6,>=4.2.5 (from pylint)
  Downloading https://files.pythonhosted.org/packages/b5/9b/f9e9307c89a80552f298cef17a62fa856b3f5220436338886d5eab64d4fa/isort-5.4.2-py3-none-any.whl (94kB)
    100% |████████████████████████████████| 102kB 1.4MB/s 
Collecting astroid<=2.5,>=2.4.0 (from pylint)
  Using cached https://files.pythonhosted.org/packages/24/a8/5133f51967fb21e46ee50831c3f5dda49e976b7f915408d670b1603d41d6/astroid-2.4.2-py3-none-any.whl
Requirement already satisfied: six~=1.12 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from astroid<=2.5,>=2.4.0->pylint)
Collecting wrapt~=1.11 (from astroid<=2.5,>=2.4.0->pylint)
  Downloading https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz
Collecting lazy-object-proxy==1.4.* (from astroid<=2.5,>=2.4.0->pylint)
  Using cached https://files.pythonhosted.org/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz
    Complete output from command python setup.py egg_info:
    WARNING: The wheel package is not available.
    ERROR: 'pip wheel' requires the 'wheel' package. To fix this, run: pip install wheel
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/q2/n_1xnt8x3b917ks7m4tlf1qm0000gn/T/tmpkb8xzf4v', '--quiet', 'setuptools_scm>=3.3.1']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "", line 1, in 
      File "/private/var/folders/q2/n_1xnt8x3b917ks7m4tlf1qm0000gn/T/pip-build-ckq9kpr8/lazy-object-proxy/setup.py", line 130, in 
        for root, _, _ in os.walk('src')
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 162, in setup
        _install_setup_requires(attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 157, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 702, in fetch_build_eggs
        replace_conflicting=True,
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 781, in resolve
        replace_conflicting=replace_conflicting
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1064, in best_match
        return self.obtain(req, installer)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1076, in obtain
        return installer(requirement)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/q2/n_1xnt8x3b917ks7m4tlf1qm0000gn/T/tmpkb8xzf4v', '--quiet', 'setuptools_scm>=3.3.1']' returned non-zero exit status 1.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/q2/n_1xnt8x3b917ks7m4tlf1qm0000gn/T/pip-build-ckq9kpr8/lazy-object-proxy/
You are using pip version 9.0.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

尝试了很多办法,比如网上说的:pip install -U setuptools 也没有用
后来尝试着自己看了报错,发现有一行报错是:
ERROR: 'pip wheel' requires the 'wheel' package. To fix this, run: pip install wheel
就想着可能是wheel的问题,于是执行了pip install wheel
下载成功之后再执行一次pip install pylint
成功了,以下是执行过程:

$ pip3 install wheel
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.35.1
You are using pip version 9.0.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

# huangxiaogua @ hxgMacBook-Pro in /Library/Frameworks/Python.framework/Versions/3.6/bin [23:04:24]
$ pip3 install pylint
Collecting pylint
  Using cached https://files.pythonhosted.org/packages/fb/13/519c1264a134beab2be4bac8dd3e64948980a5ca7833b31cf0255b21f20a/pylint-2.6.0-py3-none-any.whl
Collecting isort<6,>=4.2.5 (from pylint)
  Using cached https://files.pythonhosted.org/packages/b5/9b/f9e9307c89a80552f298cef17a62fa856b3f5220436338886d5eab64d4fa/isort-5.4.2-py3-none-any.whl
Collecting astroid<=2.5,>=2.4.0 (from pylint)
  Using cached https://files.pythonhosted.org/packages/24/a8/5133f51967fb21e46ee50831c3f5dda49e976b7f915408d670b1603d41d6/astroid-2.4.2-py3-none-any.whl
Requirement already satisfied: toml>=0.7.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pylint)
Collecting mccabe<0.7,>=0.6 (from pylint)
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting typed-ast<1.5,>=1.4.0; implementation_name == "cpython" and python_version < "3.8" (from astroid<=2.5,>=2.4.0->pylint)
  Using cached https://files.pythonhosted.org/packages/9d/f9/02030a2bbcbb164708d14cd83c8f022c9ef97d6c8dd6c1081b46d1975d74/typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl
Requirement already satisfied: six~=1.12 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from astroid<=2.5,>=2.4.0->pylint)
Collecting lazy-object-proxy==1.4.* (from astroid<=2.5,>=2.4.0->pylint)
  Using cached https://files.pythonhosted.org/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz
Collecting wrapt~=1.11 (from astroid<=2.5,>=2.4.0->pylint)
  Using cached https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz
Building wheels for collected packages: lazy-object-proxy, wrapt
  Running setup.py bdist_wheel for lazy-object-proxy ... done
  Stored in directory: /Users/huangxiaolin/Library/Caches/pip/wheels/37/cf/33/dee85e699e6fde7299b3e234d7e4a45720120b083177a7d078
  Running setup.py bdist_wheel for wrapt ... done
  Stored in directory: /Users/huangxiaolin/Library/Caches/pip/wheels/b1/c2/ed/d62208260edbd3fa7156545c00ef966f45f2063d0a84f8208a
Successfully built lazy-object-proxy wrapt
Installing collected packages: isort, typed-ast, lazy-object-proxy, wrapt, astroid, mccabe, pylint
Successfully installed astroid-2.4.2 isort-5.4.2 lazy-object-proxy-1.4.3 mccabe-0.6.1 pylint-2.6.0 typed-ast-1.4.1 wrapt-1.12.1
You are using pip version 9.0.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

你可能感兴趣的:(Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/q2/n_1xnt8x3b...)