关于pip报SyntaxError: invalid syntax的处理指导

一、问题描述

某次安装ansible过程中,使用pip list查看已安装软件时,报语法错误,如下所示:

Traceback (most recent call last):
  File "/usr/bin/pip", line 11, in <module>
    load_entry_point('pip==18.0', 'console_scripts', 'pip')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/pip-18.0-py2.6.egg/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/usr/lib/python2.6/site-packages/pip-18.0-py2.6.egg/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/usr/lib/python2.6/site-packages/pip-18.0-py2.6.egg/pip/_internal/index.py", line 536
    {str(c.version) for c in all_candidates},
                      ^
SyntaxError: invalid syntax

执行其他pip命令,报错一致。

二、处理

1、相关经验显示,gcc未安装会导致上述错误,这也跟报错里的提出c版本较匹配,但现场实际gcc已安装,版本为:4.4.7;

2、有说setuptools会影响,安装后未果,可执行:yum install setuptools或脚本安装

#!/usr/bin/env python

"""
Setuptools bootstrapping installer.

Maintained at https://github.com/pypa/setuptools/tree/bootstrap.

Run this script to install or upgrade setuptools.

This method is DEPRECATED. Check https://github.com/pypa/setuptools/issues/581 for more details.
"""

import os
import shutil
import sys
import tempfile
import zipfile
import optparse
import subprocess
import platform
import textwrap
import contextlib

from distutils import log

try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen

try:
    from site import USER_SITE
except ImportError:
    USER_SITE = None

# 33.1.1 is the last version that supports setuptools self upgrade/installation.
DEFAULT_VERSION = "33.1.1"
DEFAULT_URL = "https://pypi.io/packages/source/s/setuptools/"
DEFAULT_SAVE_DIR = os.curdir
DEFAULT_DEPRECATION_MESSAGE = "ez_setup.py is deprecated and when using it setuptools will be pinned to {0} since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools"

MEANINGFUL_INVALID_ZIP_ERR_MSG = 'Maybe {0} is corrupted, delete it and try again.'

log.warn(DEFAULT_DEPRECATION_MESSAGE.format(DEFAULT_VERSION))


def _python_cmd(*args):
    """
    Execute a command.

    Return True if the command succeeded.
    """
    args = (sys.executable,) + args
    return subprocess.call(args) == 0


def _install(archive_filename, install_args=()):
    """Install Setuptools."""
    with archive_context(archive_filename):
        # installing
        log.warn('Installing Setuptools')
        if not _python_cmd('setup.py', 'install', *install_args):
            log.warn('Something went wrong during the installation.')
            log.warn('See the error message above.')
            # exitcode will be 2
            return 2


def _build_egg(egg, archive_filename, to_dir):
    """Build Setuptools egg."""
    with archive_context(archive_filename):
        # building an egg
        log.warn('Building a Setuptools egg in %s', to_dir)
        _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
    # returning the result
    log.warn(egg)
    if not os.path.exists(egg):
        raise IOError('Could not build the egg.')


class ContextualZipFile(zipfile.ZipFile):

    """Supplement ZipFile class to support context manager for Python 2.6."""

    def __enter__(self):
        return self

    def __exit__(self, type, value, traceback):
        self.close()

    def __new__(cls, *args, **kwargs):
        """Construct a ZipFile or ContextualZipFile as appropriate."""
        if hasattr(zipfile.ZipFile, '__exit__'):
            return zipfile.ZipFile(*args, **kwargs)
        return super(ContextualZipFile, cls).__new__(cls)


@contextlib.contextmanager
def archive_context(filename):
    """
    Unzip filename to a temporary directory, set to the cwd.

    The unzipped target is cleaned up after.
    """
    tmpdir = tempfile.mkdtemp()
    log.warn('Extracting in %s', tmpdir)
    old_wd = os.getcwd()
    try:
        os.chdir(tmpdir)
        try:
            with ContextualZipFile(filename) as archive:
                archive.extractall()
        except zipfile.BadZipfile as err:
            if not err.args:
                err.args = ('', )
            err.args = err.args + (
                MEANINGFUL_INVALID_ZIP_ERR_MSG.format(filename),
            )
            raise

        # going in the directory
        subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
        os.chdir(subdir)
        log.warn('Now working in %s', subdir)
        yield

    finally:
        os.chdir(old_wd)
        shutil.rmtree(tmpdir)


def _do_download(version, download_base, to_dir, download_delay):
    """Download Setuptools."""
    py_desig = 'py{sys.version_info[0]}.{sys.version_info[1]}'.format(sys=sys)
    tp = 'setuptools-{version}-{py_desig}.egg'
    egg = os.path.join(to_dir, tp.format(**locals()))
    if not os.path.exists(egg):
        archive = download_setuptools(version, download_base,
            to_dir, download_delay)
        _build_egg(egg, archive, to_dir)
    sys.path.insert(0, egg)

    # Remove previously-imported pkg_resources if present (see
    # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details).
    if 'pkg_resources' in sys.modules:
        _unload_pkg_resources()

    import setuptools
    setuptools.bootstrap_install_from = egg


def use_setuptools(
        version=DEFAULT_VERSION, download_base=DEFAULT_URL,
        to_dir=DEFAULT_SAVE_DIR, download_delay=15):
    """
    Ensure that a setuptools version is installed.

    Return None. Raise SystemExit if the requested version
    or later cannot be installed.
    """
    to_dir = os.path.abspath(to_dir)

    # prior to importing, capture the module state for
    # representative modules.
    rep_modules = 'pkg_resources', 'setuptools'
    imported = set(sys.modules).intersection(rep_modules)

    try:
        import pkg_resources
        pkg_resources.require("setuptools>=" + version)
        # a suitable version is already installed
        return
    except ImportError:
        # pkg_resources not available; setuptools is not installed; download
        pass
    except pkg_resources.DistributionNotFound:
        # no version of setuptools was found; allow download
        pass
    except pkg_resources.VersionConflict as VC_err:
        if imported:
            _conflict_bail(VC_err, version)

        # otherwise, unload pkg_resources to allow the downloaded version to
        #  take precedence.
        del pkg_resources
        _unload_pkg_resources()

    return _do_download(version, download_base, to_dir, download_delay)


def _conflict_bail(VC_err, version):
    """
    Setuptools was imported prior to invocation, so it is
    unsafe to unload it. Bail out.
    """
    conflict_tmpl = textwrap.dedent("""
        The required version of setuptools (>={version}) is not available,
        and can't be installed while this script is running. Please
        install a more recent version first, using
        'easy_install -U setuptools'.

        (Currently using {VC_err.args[0]!r})
        """)
    msg = conflict_tmpl.format(**locals())
    sys.stderr.write(msg)
    sys.exit(2)


def _unload_pkg_resources():
    sys.meta_path = [
        importer
        for importer in sys.meta_path
        if importer.__class__.__module__ != 'pkg_resources.extern'
    ]
    del_modules = [
        name for name in sys.modules
        if name.startswith('pkg_resources')
    ]
    for mod_name in del_modules:
        del sys.modules[mod_name]


def _clean_check(cmd, target):
    """
    Run the command to download target.

    If the command fails, clean up before re-raising the error.
    """
    try:
        subprocess.check_call(cmd)
    except subprocess.CalledProcessError:
        if os.access(target, os.F_OK):
            os.unlink(target)
        raise


def download_file_powershell(url, target):
    """
    Download the file at url to target using Powershell.

    Powershell will validate trust.
    Raise an exception if the command cannot complete.
    """
    target = os.path.abspath(target)
    ps_cmd = (
        "[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
        "[System.Net.CredentialCache]::DefaultCredentials; "
        '(new-object System.Net.WebClient).DownloadFile("%(url)s", "%(target)s")'
        % locals()
    )
    cmd = [
        'powershell',
        '-Command',
        ps_cmd,
    ]
    _clean_check(cmd, target)


def has_powershell():
    """Determine if Powershell is available."""
    if platform.system() != 'Windows':
        return False
    cmd = ['powershell', '-Command', 'echo test']
    with open(os.path.devnull, 'wb') as devnull:
        try:
            subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
        except Exception:
            return False
    return True
download_file_powershell.viable = has_powershell


def download_file_curl(url, target):
    cmd = ['curl', url, '--location', '--silent', '--output', target]
    _clean_check(cmd, target)


def has_curl():
    cmd = ['curl', '--version']
    with open(os.path.devnull, 'wb') as devnull:
        try:
            subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
        except Exception:
            return False
    return True
download_file_curl.viable = has_curl


def download_file_wget(url, target):
    cmd = ['wget', url, '--quiet', '--output-document', target]
    _clean_check(cmd, target)


def has_wget():
    cmd = ['wget', '--version']
    with open(os.path.devnull, 'wb') as devnull:
        try:
            subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
        except Exception:
            return False
    return True
download_file_wget.viable = has_wget


def download_file_insecure(url, target):
    """Use Python to download the file, without connection authentication."""
    src = urlopen(url)
    try:
        # Read all the data in one block.
        data = src.read()
    finally:
        src.close()

    # Write all the data in one block to avoid creating a partial file.
    with open(target, "wb") as dst:
        dst.write(data)
download_file_insecure.viable = lambda: True


def get_best_downloader():
    downloaders = (
        download_file_powershell,
        download_file_curl,
        download_file_wget,
        download_file_insecure,
    )
    viable_downloaders = (dl for dl in downloaders if dl.viable())
    return next(viable_downloaders, None)


def download_setuptools(
        version=DEFAULT_VERSION, download_base=DEFAULT_URL,
        to_dir=DEFAULT_SAVE_DIR, delay=15,
        downloader_factory=get_best_downloader):
    """
    Download setuptools from a specified location and return its filename.

    `version` should be a valid setuptools version number that is available
    as an sdist for download under the `download_base` URL (which should end
    with a '/'). `to_dir` is the directory where the egg will be downloaded.
    `delay` is the number of seconds to pause before an actual download
    attempt.

    ``downloader_factory`` should be a function taking no arguments and
    returning a function for downloading a URL to a target.
    """
    # making sure we use the absolute path
    to_dir = os.path.abspath(to_dir)
    zip_name = "setuptools-%s.zip" % version
    url = download_base + zip_name
    saveto = os.path.join(to_dir, zip_name)
    if not os.path.exists(saveto):  # Avoid repeated downloads
        log.warn("Downloading %s", url)
        downloader = downloader_factory()
        downloader(url, saveto)
    return os.path.realpath(saveto)


def _build_install_args(options):
    """
    Build the arguments to 'python setup.py install' on the setuptools package.

    Returns list of command line arguments.
    """
    return ['--user'] if options.user_install else []


def _parse_args():
    """Parse the command line for options."""
    parser = optparse.OptionParser()
    parser.add_option(
        '--user', dest='user_install', action='store_true', default=False,
        help='install in user site package')
    parser.add_option(
        '--download-base', dest='download_base', metavar="URL",
        default=DEFAULT_URL,
        help='alternative URL from where to download the setuptools package')
    parser.add_option(
        '--insecure', dest='downloader_factory', action='store_const',
        const=lambda: download_file_insecure, default=get_best_downloader,
        help='Use internal, non-validating downloader'
    )
    parser.add_option(
        '--version', help="Specify which version to download",
        default=DEFAULT_VERSION,
    )
    parser.add_option(
        '--to-dir',
        help="Directory to save (and re-use) package",
        default=DEFAULT_SAVE_DIR,
    )
    options, args = parser.parse_args()
    # positional arguments are ignored
    return options


def _download_args(options):
    """Return args for download_setuptools function from cmdline args."""
    return dict(
        version=options.version,
        download_base=options.download_base,
        downloader_factory=options.downloader_factory,
        to_dir=options.to_dir,
    )


def main():
    """Install or upgrade setuptools and EasyInstall."""
    options = _parse_args()
    archive = download_setuptools(**_download_args(options))
    return _install(archive, _build_install_args(options))

if __name__ == '__main__':
    sys.exit(main())

注意:ez_setup.py 已弃用,使用它时 setuptools 将被链接到 33.1.1版本,因它是支持 setuptools 自我升级/安装的最后一个版本,脚本下载 https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip,然后python setup.py install。

3、有经验表明,python2.6版本会导致该问题,尤其centos6里;升级python到2.7,执行:

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzf Python-2.7.3.tgz
mkdir /usr/local/python2.7
/configure --prefix=/usr/local/python2.7  //编译到其他目录,避免覆盖原目录
make
make install
mv /usr/bin/python /usr/bin/python2.6.6
cp /usr/local/python2.7/bin/python /usr/bin/
ln -s /usr/bin/python /usr/bin/python2.7
python -V    //
Python 2.7.3
#yum不兼容2.7.3 ,编辑yum修改#!/usr/bin/python2.6
vim /usr/bin/yum

pip list  //验证
Traceback (most recent call last):
  File "/usr/bin/pip", line 6, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
#重新安装distribute
https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip

unzip distribute-0.7.3.zip
python setup.py install  //报错如下
 File "/usr/local/python2.7/lib/python2.7/md5.py", line 10, in <module>
    from hashlib import md5
ImportError: cannot import name md5

wget https://pypi.tuna.tsinghua.edu.cn/packages/74/bb/9003d081345e9f0451884146e9ea2cff6e4cc4deac9ffd4a9ee98b318a49/hashlib-20081119.zip#sha256=419de2fd10ae71ed9c6adcb55903f116abd1d8acc8c814dfd5f839b4d5013e38
unzip hashlib-20081119.zip
python setup.py build
python setup.py install  //输出如下
……
gcc -pthread -shared build/temp.linux-x86_64-2.7/Modules/sha256module.o -o build/lib.linux-x86_64-2.7/_sha256.so
building '_sha512' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/python2.7/include/python2.7 -c Modules/sha512module.c -o build/temp.linux-x86_64-2.7/Modules/sha512module.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/Modules/sha512module.o -o build/lib.linux-x86_64-2.7/_sha512.so
running install_lib
copying build/lib.linux-x86_64-2.7/hashlib.py -> /usr/local/python2.7/lib/python2.7/site-packages
copying build/lib.linux-x86_64-2.7/_md5.so -> /usr/local/python2.7/lib/python2.7/site-packages
copying build/lib.linux-x86_64-2.7/_sha.so -> /usr/local/python2.7/lib/python2.7/site-packages
copying build/lib.linux-x86_64-2.7/_sha256.so -> /usr/local/python2.7/lib/python2.7/site-packages
copying build/lib.linux-x86_64-2.7/_sha512.so -> /usr/local/python2.7/lib/python2.7/site-packages
byte-compiling /usr/local/python2.7/lib/python2.7/site-packages/hashlib.py to hashlib.pyc
running install_egg_info
Writing /usr/local/python2.7/lib/python2.7/site-packages/hashlib-20081119-py2.7.egg-info

#然后再安装distribute
python setup.py install  //输出如下
……
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying distribute.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating dist
creating 'dist/distribute-0.7.3-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing distribute-0.7.3-py2.7.egg
Copying distribute-0.7.3-py2.7.egg to /usr/local/python2.7/lib/python2.7/site-packages
Adding distribute 0.7.3 to easy-install.pth file

Installed /usr/local/python2.7/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg
Processing dependencies for distribute==0.7.3
Searching for setuptools==0.8b2
Best match: setuptools 0.8b2
Adding setuptools 0.8b2 to easy-install.pth file
Installing easy_install script to /usr/local/python2.7/bin
Installing easy_install-2.7 script to /usr/local/python2.7/bin

Using /home/Python-2.7.3/distribute-0.7.3
Finished processing dependencies for distribute==0.7.3
#再次验证
pip -V
Traceback (most recent call last):
  File "/usr/bin/pip", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/Python-2.7.3/distribute-0.7.3/pkg_resources.py", line 2989, in <module>
    working_set.require(__requires__)
  File "/home/Python-2.7.3/distribute-0.7.3/pkg_resources.py", line 726, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/Python-2.7.3/distribute-0.7.3/pkg_resources.py", line 624, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==18.0

#重新安装pip
wget https://files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b0931ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz#sha256=a0e11645ee37c90b40c46d607070c4fd583e2cd46231b1c06e389c5e814eed76
tar -xzf pip-18.0.tar.gz
cd pip-18.0
python setup.py build
python setup.py install  //输出如下
……
creating dist
creating 'dist/pip-18.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pip-18.0-py2.7.egg
creating /usr/local/python2.7/lib/python2.7/site-packages/pip-18.0-py2.7.egg
Extracting pip-18.0-py2.7.egg to /usr/local/python2.7/lib/python2.7/site-packages
Adding pip 18.0 to easy-install.pth file
Installing pip script to /usr/local/python2.7/bin
Installing pip2.7 script to /usr/local/python2.7/bin
Installing pip2 script to /usr/local/python2.7/bin

Installed /usr/local/python2.7/lib/python2.7/site-packages/pip-18.0-py2.7.egg
Processing dependencies for pip==18.0
Finished processing dependencies for pip==18.0
#再次验证
pip list
Package    Version 
---------- --------
distribute 0.7.3   
hashlib    20081119
pip        18.0    
setuptools 0.8b2   
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
#更改pip源为国内的镜像源
pip install xxx -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx

pip -V //输出如下
pip 18.0 from /usr/local/python2.7/lib/python2.7/site-packages/pip-18.0-py2.7.egg/pip (python 2.7)

pip show pip  //输出如下
Name: pip
Version: 18.0
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: pypa-dev@groups.google.com
License: MIT
Location: /usr/local/python2.7/lib/python2.7/site-packages/pip-18.0-py2.7.egg
Requires: 
Required-by: 

备注:其他源

阿里云 http://mirrors.aliyun.com/pypi/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

4、升级pip

python -m pip install pip -U //或--upgrade 
pip install --upgrade setuptools
python -m pip install setuptools==18.5 -i http://pypi.douban.com/simple --trusted-host=pypi.douban.com

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
当在使用pip命令时遇到"SyntaxError: invalid syntax"错,可能是因为pip版本不兼容或安装过程中出现了错误。解决此问题的方法如下: 1. 首先,可以尝试升级pip。使用以下命令升级pip: - 对于Python 2.x:`python -m pip install pip -U` - 对于Python 3.x:`python3 -m pip install pip -U` 2. 如果升级pip后仍然出现问题,可以尝试升级setuptools。使用以下命令升级setuptools: - 对于Python 2.x:`python -m pip install setuptools==18.5 -U` - 对于Python 3.x:`python3 -m pip install setuptools==18.5 -U` 3. 如果以上方法仍无法解决问题,可能是因为操作系统环境的原因。比如在Ubuntu 16.04上更新pip可能会遇到这个问题。可以尝试以下解决方案: - 打开终端,输入以下命令:`vim get-pip.py`。 - 根据你的Python版本选择对应的pip文件,比如对于Python 3.5:`https://bootstrap.pypa.io/pip/3.5/get-pip.py`,对于Python 2.7:`https://bootstrap.pypa.io/pip/2.7/get-pip.py`。 - 复制相应的pip文件内容到get-pip.py文件中。 - 执行命令安装pip,对于Python 3.5:`python get-pip.py`,对于Python 2.7:`python3 get-pip.py`。 通过以上方法,你应该能够解决pip命令出现"SyntaxError: invalid syntax"的问题。希望对你有所帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [解决pip install xxxSyntaxError: invalid syntax的问题](https://download.csdn.net/download/weixin_38637764/12865955)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [关于pipSyntaxError: invalid syntax处理指导](https://blog.csdn.net/ximenjianxue/article/details/125703854)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Ubuntu16.04更新pip错sys.stderr.write(f”ERROR: {exc}”)](https://blog.csdn.net/lun55423/article/details/114650433)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

羌俊恩

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值