我的python是2.7.5,
-bash-4.2$ python --version
Python 2.7.5
Run Code Online (Sandbox Code Playgroud)
默认情况下它没有 python pip。
我的 Linux 是 Redhat ERHL 7.3。
-bash-4.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
Run Code Online (Sandbox Code Playgroud)
我还检查了 Linux 存储库中没有 python-pip 。
-bash-4.2$ yum search python-pip
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager
*Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories.
cloudera-manager 7/7
Warning: No matches found for: python-pip
No matches found
Run Code Online (Sandbox Code Playgroud)
我安装 pip 的方法是使用get-pip.py
. 我get-pip.py
从https://packaging.python.org/installing/得到
下载链接为https://bootstrap.pypa.io/get-pip.py
我为我的 Windows 笔记本电脑下载了它,然后通过 ftp 将它上传到 Linux 服务器。
当我跑python get-pip.py
。它尝试连接到 Internet。
-bash-4.2$ python get-pip.py
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x35755d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3575a90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Run Code Online (Sandbox Code Playgroud)
题:
如果您不想采用操作系统方式,您还可以从 PyPI 下载源存档并手动安装。
python setup.py install
归档时间: |
|
查看次数: |
26424 次 |
最近记录: |