❶ 為什麼用pip install會出現Could not find a version that satisfies the requirement ×××
關掉代理就好了。我的是這樣

❷ python 2.7 urlopen 函數,如何提高下載速度.
可以使用多進程或多線程並發下載。其實你的方法已經是多進程的一種了。
python中有多進程模塊multiprocessing和多線程multithreading。
思路是這樣,將需要下載的連接送入隊列,然後各個進程(或線程)從隊列里拿任務然後下載。前面的兩個類庫都提供進程、線程安全的隊列。
樓下給了個多線程的示例,這里我給一個稍微復雜點的進程的示例。其實線程和進程庫的介面基本是一致的。
#!/usr/bin/envpython
#encoding=utf-8
#test.py
,Process
fromQueueimportEmpty
importurllib
importtime
urls=[line.strip()forlineinopen('urls.txt')]
queue=Queue(1024)
forurlinurls:
queue.put(url)
defdownload():
whileTrue:
try:
url=queue.get()
f=urllib.urlopen(url)
r=f.read()
#這里保存你下載的文件
exceptEmpty:
time.sleep(5)
exceptException,e:
print'downloaderror:%s'%e
foriinrange(10):
p=Process(target=download)
p.start()
p.join()
使用方法:編輯一個文件urls.txt,每行一個url。然後:
nohup./test.py&
結束進程則需要找到它的進程號,然後kill -9
望採納,謝謝支持!