centos7.9安装pip过程记录
centos7.9安装pip过程:# yum install -y python-pipLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.163.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.163.comResolving Dependencies--> Running transaction check---> Package python2-pip.noarch 0:8.1.2-14.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved
================================================================================================================================================================================================================= Package Arch Version Repository Size=================================================================================================================================================================================================================Installing: python2-pip noarch 8.1.2-14.el7 epel 1.7 M
Transaction Summary=================================================================================================================================================================================================================Install1 Package
Total download size: 1.7 MInstalled size: 7.2 MDownloading packages:python2-pip-8.1.2-14.el7.noarch.rpm | 1.7 MB00:00:06 Running transaction checkRunning transaction testTransaction test succeededRunning transactionWarning: RPMDB altered outside of yum.Installing : python2-pip-8.1.2-14.el7.noarch 1/1 Verifying: python2-pip-8.1.2-14.el7.noarch 1/1
Installed:python2-pip.noarch 0:8.1.2-14.el7
Complete!# pip install pipRequirement already satisfied (use --upgrade to upgrade): pip in /usr/lib/python2.7/site-packagesYou are using pip version 8.1.2, however version 21.2.4 is available.You should consider upgrading via the 'pip install --upgrade pip' command.# ^C# pip install -U pipCollecting pipDownloading https://files.pythonhosted.org/packages/52/e1/06c018197d8151383f66ebf6979d951995cf495629fc54149491f5d157d0/pip-21.2.4.tar.gz (1.6MB) 100% |????????????????????????????????| 1.6MB 516kB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-kl5Zbb/pip/setup.py", line 7 def read(rel_path: str) -> str: ^ SyntaxError: invalid syntax ----------------------------------------Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kl5Zbb/pip/You are using pip version 8.1.2, however version 21.2.4 is available.You should consider upgrading via the 'pip install --upgrade pip' command.
pip版本超过21报错,只能限制版本小于21:
# pip install -U "pip<21"Collecting pip<21Downloading https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl (1.5MB) 100% |????????????????????????????????| 1.5MB 327kB/s Installing collected packages: pipFound existing installation: pip 8.1.2 Uninstalling pip-8.1.2: Successfully uninstalled pip-8.1.2Successfully installed pip-20.3.4You are using pip version 20.3.4, however version 21.2.4 is available.You should consider upgrading via the 'pip install --upgrade pip' command.# pip
Usage: pip <command>
Commands:install Install packages.download Download packages.uninstall Uninstall packages.freeze Output installed packages in requirements format.list List installed packages.show Show information about installed packages.check Verify installed packages have compatible dependencies.config Manage local and global configuration.search Search PyPI for packages.cache Inspect and manage pip's wheel cache.wheel Build wheels from your requirements.hash Compute hashes of package archives.completion A helper command used for command completion.debug Show information useful for debugging.help Show help for commands.
General Options:-h, --help Show help.--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.-v, --verbose Give more output. Option is additive, and can be used up to 3 times.-V, --version Show version and exit.-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).--log <path> Path to a verbose appending log.--no-input Disable prompting for input.--proxy <proxy> Specify a proxy in the form proxy.server:port.--retries <retries> Maximum number of retries each connection should attempt (default 5 times).--timeout <sec> Set the socket timeout (default 15 seconds).--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.--trusted-host <hostname> Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.--cert <path> Path to alternate CA bundle.--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.--cache-dir <dir> Store the cache data in <dir>.--no-cache-dir Disable the cache.--disable-pip-version-check Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.--no-color Suppress colored output.--no-python-version-warning Silence deprecation warnings for upcoming unsupported Pythons.--use-feature <feature> Enable new functionality, that may be backward incompatible.--use-deprecated <feature>Enable deprecated functionality, that will be removed in the future.# pip -Vpip 20.3.4 from /usr/lib/python2.7/site-packages/pip (python 2.7)#
页:
[1]