conda虚拟环境 | install 与 list 问题

本文讨论了conda创建的虚拟环境中,conda与pip安装包的区别。conda能安装Anaconda仓库中的包,但遇到不在仓库中的包如fake-useragent,pip install可以补充安装,并且安装后的包会同时出现在conda list和pip list中,且能在环境中成功导入。
摘要由CSDN通过智能技术生成

1. conda 创建虚拟环境,此时,conda list为空, pip list 为本机pip list

2. 

conda install python=3.9

之后 ,pip  list 与conda  list相同,均为python与相关依赖包

3.

conda install fake-useragent==0.1.11

conda 可以安装anaconda上拥有的包(大约有一千多个) ,但是有些包anaconda不存在,以fake-useragent(0.1.11)为例

若安装会出现:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - fake-useragent==0.1.11

Current channels:

  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaco
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值