You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04下Python3.5.2的pip安装所有包失败求助

Fixing pip Wheel URL Fetch Issues on Ubuntu 16.04 (Python 3.5.2)

Hey there, let's work through this pip problem you're dealing with—since you can't install any packages via pip and have to manually download wheels, it sounds like pip is having trouble resolving or fetching the wheel package URLs correctly. Here are some targeted fixes to try with your setup:

1. Upgrade pip to a version compatible with Python 3.5

Python 3.5 is end-of-life, so newer pip versions (10+) don't support it anymore. Outdated pip can have bugs with URL handling, so let's upgrade to the latest compatible version:

python3 -m pip install --upgrade pip==9.0.3

This version is specifically built to work with Python 3.5 and should fix most URL resolution quirks.

2. Switch to a reliable PyPI mirror

Sometimes the default PyPI source has connectivity issues. Try using a domestic mirror temporarily to test:

pip -v install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple

If this works, make the mirror permanent by creating/editing ~/.pip/pip.conf with:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

3. Check for interfering proxy settings

Proxies can block pip from accessing PyPI URLs. First, check if any proxy variables are set:

echo $HTTP_PROXY $HTTPS_PROXY

If you see proxy values, unset them temporarily and retry the install:

unset HTTP_PROXY HTTPS_PROXY
pip -v install pandas

4. Verify SSL functionality for Python

Pip requires a working SSL module to access HTTPS PyPI sources. Test if your Python 3.5 has SSL enabled:
Open a Python shell and run:

import ssl
print(ssl.OPENSSL_VERSION)

If this throws an error, install the SSL development libraries and repair your Python setup:

sudo apt-get install libssl-dev

If you installed Python 3.5 from source, you'll need to recompile it with the SSL libraries available. For the system-provided Python 3.5, this package should fix the dependency.

5. Test direct URL accessibility

Let's confirm if you can reach the pandas package URL directly. For Python 3.5, the last compatible pandas version is 0.25.3—test with curl:

curl -I https://pypi.org/packages/source/p/pandas/pandas-0.25.3.tar.gz

If you get a 200 OK response, your network can reach PyPI, so the issue is definitely with pip's handling of URLs (go back to step 1 to upgrade pip).

Your provided log snippet:

Created temporary directory: /tmp/pip-ephem-wheel-cache-qfdazbyv Creat...

内容的提问来源于stack exchange,提问作者Harman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:25:29