報錯 :Could not find a version that satisfies the requirement xlrd (from versions: )
No matching distribution found for xlrd
這是因為網絡的問題,需要使用國內的鏡像源來加速,比如豆瓣源
方式一:
命令改為:
pip install xlrd http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
或者
pip3 install xlrd http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
方案二:
設置延遲時間
命令:pip --default-timeout=100 install xlrd pip
方案三:
在pip安裝路徑下,創建python文件(.py)
import os ini="""[global] index-url = https://pypi.doubanio.com/simple/ [install] trusted-host=pypi.doubanio.com """ pippath=os.environ["USERPROFILE"]+"\\pip\\" if not os.path.exists(pippath): os.mkdir(pippath) with open(pippath+"pip.ini","w+") as f: f.write(ini)
在cmd上運行這個python文件,之后再用pip install命令安裝速度非常快。