新手入门常见问题--下载第三方库及查看

anaconda 中下载第三方库的时候,需要下载到数据包中。

操作方法:

      第一步 打开 anaconda  prompt

(base) C:\Users\Administrator>

     第二步 输入 pip install  sklearn(自己已经下载过的库) 

     或者输入   cd  c:\users\administrator\anaconda3\lib\site-packages    

把路径改成数据包路径,然后直接下载

(base) C:\Users\Administrator>pip install  sklearn
Requirement already satisfied: sklearn in c:\users\administrator\anaconda3\lib\site-packages (0.0)
Requirement already satisfied: scikit-learn in c:\users\administrator\anaconda3\lib\site-packages (from sklearn) (0.24.2)

                   主要用于找到下载的数据包地址

    第三步 在数据包地址中下载需要安装的第三方库

                常见格式为:pip install --target=c:\users\administrator\anaconda3\lib\site-packages    graphviz             红色部分为自己的数据包地址,黄色部分为自己下载的库

(base) C:\Users\Administrator>pip install --target=c:\users\administrator\anaconda3\lib\site-packages graphviz
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/graphviz/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/graphviz/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/graphviz/
Collecting graphviz
  Using cached graphviz-0.17-py3-none-any.whl (18 kB)
Installing collected packages: graphviz
Successfully installed graphviz-0.17

地址与下载库之间有空格

查看下载好的第三方库:

                 pip list

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值