jupyter notebook使用源安装库
我们在使用jupyter notebook写程序的时候,需要安装缺失的库,我们经常会打开cmd黑框去pip install + 库名,这样显得很麻烦,也没有B格,所以这里我们可以直接在jupyter notebook中去安装库,只需要在pip install + 库名之前加一个!就可以了,如下:
! pip install yfinance
有的时候会显示安装失败,是由于访问网络的问题,需要梯子(懂得都懂)!出现这个问题,我们可以使用镜像源来解决,如下:
! pip install yfinance -i http://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn
好了,今天就记录这一点吧!有什么问题,可以评论,咋们一起讨论!