conda install 出错
在下载包时出现下面的错误:
userdeMBP:pytorch user$ conda install -n deeplearning matplotlib Solving environment: failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/osx-64/repodata.json.bz2> Elapsed: -An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way.If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team.ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/osx-64/repodata.json.bz2 (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Read timed out. (read timeout=9.15)"))'))
一开始是调用config命令去设置清华的镜像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/c conda config --set show_channel_urls yes //设置配置中的参数 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
但是还是出错:
(deeplearning) userdeMBP:~ user$ conda install matplotlib Solving environment: failedCondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/c/noarch/repodata.json> Elapsed: 00:00.226091The remote server could not find the noarch directory for the requested channel with url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/c As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is empty. please request that the channel administrator create `noarch/repodata.json` and associated `noarch/repodata.json.bz2` files. $ mkdir noarch $ echo '{}' > noarch/repodata.json $ bzip2 -k noarch/repodata.jsonYou will need to adjust your conda configuration to proceed. Use `conda config --show channels` to view your configuration's current state. Further configuration help can be found at <https://conda.io/docs/config.html>.
后面发现可能是这个镜像的问题,打开本地的.condrac文件,将设置的channels改成:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
后面再运行就发现成功了
(deeplearning) userdeMBP:~ user$ conda install matplotlib Solving environment: done==> WARNING: A newer version of conda exists. <==current version: 4.5.12latest version: 4.6.8Please update conda by running$ conda update -n base -c defaults conda## Package Plan ##environment location: /anaconda3/envs/deeplearningadded / updated specs: - matplotlibThe following packages will be downloaded:package | build---------------------------|-----------------tornado-5.1.1 | py37h1de35cc_0 661 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainmatplotlib-3.0.2 | py37h54f8f79_0 6.5 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainkiwisolver-1.0.1 | py37h0a44026_0 56 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainpyparsing-2.3.1 | py37_0 105 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainpytz-2018.9 | py37_0 268 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/maincycler-0.10.0 | py37_0 14 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainca-certificates-2019.1.23 | 0 126 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainopenssl-1.1.1b | h1de35cc_1 3.4 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainpython-dateutil-2.8.0 | py37_0 281 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/maincertifi-2019.3.9 | py37_0 155 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main------------------------------------------------------------Total: 11.6 MBThe following NEW packages will be INSTALLED:cycler: 0.10.0-py37_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainkiwisolver: 1.0.1-py37h0a44026_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainmatplotlib: 3.0.2-py37h54f8f79_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainpyparsing: 2.3.1-py37_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainpython-dateutil: 2.8.0-py37_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainpytz: 2018.9-py37_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/maintornado: 5.1.1-py37h1de35cc_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main The following packages will be UPDATED:ca-certificates: 2019.1.23-0 defaults --> 2019.1.23-0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/maincertifi: 2019.3.9-py37_0 defaults --> 2019.3.9-py37_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainopenssl: 1.1.1b-h1de35cc_1 defaults --> 1.1.1b-h1de35cc_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main Proceed ([y]/n)? y... Preparing transaction: done Verifying transaction: done Executing transaction: done
之后如果设置了另一个函数再次进行install时,明明之前已经更改了channels,但如果还是遇见了这样的问题:
(deeplearning2) userdeMBP:neural transfer user$ conda install matplotlib Solving environment: failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/osx-64/repodata.json.bz2>
解决办法就是退出该环境,使用-n来指明下载的环境,这样就不会出现这样的问题了:
userdeMBP:pytorch user$ conda install -n deeplearning2 matplotlib
但是最好还是直接进入该环境下,使用pip install来安装包,不容易出错
转载于:https://www.cnblogs.com/wanghui-garcia/p/10525015.html
conda install 出错相关推荐
- conda activate 出错
问题及解决办法 1 使用conda activate出错 在cmd中使用 conda.bat activate 进入环境后在进行操作 2. conda install出错 ,使用pip instal ...
- 解决conda创建新环境慢 conda install 速度慢 报错问题
在使用conda create 创建新环境或者利用conda install 安装软件包的时候,大部分同学应该都遇到过安装速度慢(主要因为下载速度过慢,或者下载到一半出错的问题) 网上的解决方案通常是 ...
- conda install和pip install的区别
在使用conda的过程中,是不是很疑惑,pip可以安装python库,conda也可以. 那么他们俩有什么区别吗? 1. 源不同 首先他们的源肯定是不同的,虽然好像都可以替换为国内的源,但是本质上他们 ...
- Anaconda:conda install packages error 详解channel 设置
目录: 前言 正文 前言 在使用conda install xgboost时遇到了一些安装的问题,上网学习了一下,现整理如下. 正文 conda可以被用来安装包(seborn是个包,numpy也是个包 ...
- 巨坑 之 pip install 和 conda install 的区别 以及 查看 和 修改 虚拟环境下运行路径
先来说明我的问题:首先我在anoconda下建立了自己的虚拟环境,并在我的虚拟环境中用pip安装了对应版本的tensorflow,但是再调用的时候,我发现并没有调用我安装的tensorflow版本.导 ...
- Windows 下 Conda install 安装出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url解决措施
在使用Conda install 安装库的时候出现以下错误 原因是使用的是国外的镜像,切换至国内镜像就可以解决啦 在cmd 中输入下面命令 conda config --add channels ht ...
- anaconda base环境_anaconda中安装packages:pip还是conda install?
conda install我就不说了,这都不会别学了就. Using command:$ which -a pip, the terminal will return: This indicates ...
- conda install 换源_科学网—Anaconda 报错Multiple Errors Encountered和添加国内镜像以及换源和恢复默认源 - 张伟的博文...
(一)情景一 在安装完成 Anaconda 后,创建虚拟环境接连遇到报错 Multiple Errors Encountered 和 Anaconda An HTTP error occurred ...
- 解决conda install安装arch报错的问题
解决方法: conda install -c conda-forge arch-py
最新文章
- Ant Design 使用小结
- C++从0到1的入门级教学(十二)——运算符重载
- linux跨ip拷贝,Linux的虚拟机拷贝到另外的操作系统时,NAT方式的静态IP无效,一直是获取的DHCP动态地址...
- 太长的sql怎么分析_因为ESR, 我一定要推荐你这款 SQL 神器
- 当Tomcat配置安装都成功端口号也没问题时网页输入http://localhost:8080/打不开如何解决
- linux系列(一):ls命令
- coderforces Gym 100803A/Aizu 1345/CSU 1536/UVALive 6832 Bit String Reordering(贪心证明缺)
- Cloud Native Infrastructures Meetup 精彩回顾(内含 PPT 下载)
- InnoDB存储引擎的主要优点
- PDF权限密码怎么解除
- 【c++算法】《c/c++实现SM4加密解密算法》
- IntelliJ Save Action
- 机器视觉软件EVision介绍
- 网络基础知识:10M、50M、100M宽带下载速率一般是多少?
- 悟空在哪里?奶妈在哪里?
- C 语言的fseek()
- 三极管:潜伏3个月的彩蛋是来自火星的么
- 张瑞敏分享海尔变革实践:借鉴黄金圈法则 革自己的命
- 帝国cms 留言板html,帝国cms默认留言板加上头像主页地址的留言本模板插件
- 小评一下 水果豆浆机
热门文章
- afm原子力分析软件_安东帕Tosca系列原子力显微镜在聚合物表面上大显身手
- php where 不包含,php – 除非它们包含“where”或“like”子句,否则不允许删除
- python函数的作用域_python函数的作用域和引用范围
- GPU Gems1 - 5 改良的Perlin噪声的实现
- macos ntfs插件_Mac下NTFS读写插件NTFS for Mac介绍
- HMM——前向后向算法
- windows7 下vmware workstation 12安装Ubuntu16.04虚拟机及安装和共享文件夹
- ComponentName的意思
- Android小項目之--ListView與ListAcitivity完善論壇管理效果2(附源碼)
- JS 数据处理技巧及小算法汇总(转载)