conda

Anaconda使用教程全攻略

大城市里の小女人 提交于 2020-02-03 23:47:25
Anaconda使用教程全攻略 本文转自 https://zhuanlan.zhihu.com/p/32925500 〇、序 Python是一种面向对象的解释型计算机程序设计语言,其使用,具有跨平台的特点,可以在Linux、macOS以及Windows系统中搭建环境并使用,其编写的代码在不同平台上运行时,几乎不需要做较大的改动,使用者无不受益于它的便捷性。 此外,Python的强大之处在于它的应用领域范围之广,遍及人工智能、科学计算、Web开发、系统运维、大数据及云计算、金融、游戏开发等。实现其强大功能的前提,就是Python具有数量庞大且功能相对完善的标准库和第三方库。通过对库的引用,能够实现对不同领域业务的开发。然而,正是由于库的数量庞大,对于管理这些库以及对库作及时的维护成为既重要但复杂度又高的事情。 一、什么是Anaconda? 1. 简介 Anaconda( 官方网站 )就是可以便捷获取包且对包能够进行管理,同时对环境可以统一管理的发行版本。Anaconda包含了conda、Python在内的超过180个科学包及其依赖项。 2. 特点 Anaconda具有如下特点: ▪ 开源 ▪ 安装过程简单 ▪ 高性能使用Python和R语言 ▪ 免费的社区支持 其特点的实现主要基于Anaconda拥有的: ▪ conda包 ▪ 环境管理器 ▪ 1,000+开源库

conda配置清华源 国内源

痴心易碎 提交于 2020-02-03 13:48:43
anaconda是一个balabalabala... 知道这个软件的人肯定不用介绍,不知道的也不必介绍。 conda是anaconda的包管理器,通过conda可以从软件源中下载用户制定的软件及其依赖软件并在用户的系统上进行安装。 这里要说的是,conda的官方源因为服务器在国外,所以速度是很慢的。这里介绍给conda换成国内软件源的方式。这里使用的是清华大学计算机协会(tuna)提供的软件源。 也有一些其他机构提供了conda的软件源镜像,但是我没搜到相关的官方文档,所以这里只介绍tuna的,有其他需求的用户可以自行查找。 直接安装conda之后,执行下述命令就可以: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --set show_channel_urls yes 参考 Anaconda 镜像使用帮助: https://mirror.tuna.tsinghua.edu.cn/help/anaconda/ miniconda

win10安装pytorch1.4.0CPU版本,Python3.6

巧了我就是萌 提交于 2020-02-03 12:11:01
背景:我在祖国最西边,移动网,网速特别慢,打开CSDN都困难,更别提从pytorch官网下载安装,只能DIY。不是我抱怨,光安装pytorch我花了2天时间。 我遇到的问题 1.按照官网的方式无法安装pytorch最新版本1.4,pip和conda都不行。 我只能去官网 按照官网上面的地址,去登陆torch_stable网站(在我这里打开这个网站很慢,我买了阿里云服务器,在服务器上下载再传到本地)。 下载 torch-1.4.0+cpu-cp36-cp36m-win_amd64.whl torchvision-0.5.0+cu92-cp36-cp36m-win_amd64.whl 直接pip安装提示说各种依赖库没安装,conda安装,让人难受的是conda去国内镜像源(conda已经切换国内,安装速度快)核对有没有这个包,很遗憾返回的结果是不存在这个包,我也不知道为什么会这样,总之安装失败。 但是,很幸运的是,我可以按照刚才pip的依赖库提示,用conda去装依赖库,最后再用pip安装torch和torchvision的whl文件。是有点绕,但是能解决我的问题。 思路:依赖库用conda装,conda是国内源,速度比pip快,本地whl文件用pip安装。pip安装whl文件的时候,她会检查依赖包,如果缺失用conda装,哈哈。 成功安装截图: 导入python:

Create conda environment: “Found conflicts!” when solving environment and “Finding shortest conflict path” running forever

筅森魡賤 提交于 2020-02-03 04:38:06
问题 I was provided with an environment.ubuntu.yml file to be able to create a conda environment. However, running conda create env --file environment.ubuntu.yml I get the following output: conda env create --file environment.ubuntu.yml Collecting package metadata (repodata.json): done Solving environment: - Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. Examining fontconfig: 5%|▉ | 10/202 [00:00<00:00, 5393.91it/ ] Comparing specs that

Activate conda environment stopped working in vscode

北慕城南 提交于 2020-02-03 04:15:21
问题 I have noticed that conda activate environment stopped working in vscode integrated terminal with no obvious reason (I certainly did not install any new extensions, nor updated conda or vscode in the last few days). Expected behaviour After running conda activate environment I want the environment to be activated and be capable of using the environment python interpreter. Essentially it should look like this: (base) lpravda-ml:~ lpravda$ conda activate rdkit-env (rdkit-env) lpravda-ml:~

Install glumpy (or other non-conda packages) in conda environment

喜你入骨 提交于 2020-02-02 13:33:09
问题 I have an Anaconda (newest version) environment with Python 3.7.5 installed , it is my only environment so far . Now I want to install glumpy, which is not listed in the anaconda cloud and channels, but it is cloneable via GitHub und installable via pip . I even have a pre-built wheel lying around, still with the newest version. Now, since I only use the conda environment and no other Python installation, I would very much like to get it to work there, without introducing some long-term bugs

Install glumpy (or other non-conda packages) in conda environment

六月ゝ 毕业季﹏ 提交于 2020-02-02 13:33:07
问题 I have an Anaconda (newest version) environment with Python 3.7.5 installed , it is my only environment so far . Now I want to install glumpy, which is not listed in the anaconda cloud and channels, but it is cloneable via GitHub und installable via pip . I even have a pre-built wheel lying around, still with the newest version. Now, since I only use the conda environment and no other Python installation, I would very much like to get it to work there, without introducing some long-term bugs

Win10 Anaconda pytorch GPU

安稳与你 提交于 2020-02-02 13:30:58
电脑当前环境 win10 64bit cuda90 (需要提前安装好 ) 注意 ⚠️:若你的cuda是其它版本,那么后面的pytorch也要装相应的cuda版本 镜像下载安装(强烈推荐) 首先进入此链接 torch清华镜像源链接 . 分别下载: pytorch-1.1.0-py3.7_cuda90_cudnn7_1.tar.bz2 torchvision-0.3.0-py37_cu90_1.tar.bz2 执行指令: 创建一个conda的环境,我这里是brats conda create -n brats python=3.7 进入新环境brats,并安装一些依赖项 conda activate brats conda install numpy mkl cffi 分别执行一下命令进行安装 conda install --offline .\pytorch-1.1.0-py3.7_cuda90_cudnn7_1.tar.bz2 conda install --offline .\torchvision-0.3.0-py37_cu90_1.tar.bz2 再安装个依赖项 conda install Pillow=6.1 检验 在命令行窗口依次输入 python import torch import torchvision print(torch.__version__) print

VScode配置powershell为默认shell调试python代码(conda环境)

假装没事ソ 提交于 2020-02-02 04:01:08
主要是因为在VScode里进行python调试的时候,发现在只能用cmd,不能用powershel。本身倒是没什么,只用cmd也可以,但是选择cmd作为Default shell的时候,运行脚本第一次都不能直接进入conda建立的虚拟环境,不懂为什么,也没有找到合适的解决方案,就把默认的shell更换到powershell,发现可以直接运行,不会出现第一次错误的情况。 第一步:处理powershell不能用conda的问题 解决步骤: 1. 以管理员身份运行PowerShell 2. 执行:get-ExecutionPolicy,回复Restricted,表示状态是禁止的 3. 执行:set-ExecutionPolicy RemoteSigned即可 参考: https://blog.csdn.net/a996790089/article/details/102057934 第二步:初始化conda 1. 以管理员身份运行PowerShell 2. 输入命令 conda init powershell 3. 关闭当前powershell窗口 参考: https://www.cnblogs.com/dereen/p/ps_conda_env.html 之后就可以直接在VScode里直接选用powershell 来源: CSDN 作者: Knight of Zero 链接:

Centos7安装 Anaconda + jupyter notebook

元气小坏坏 提交于 2020-02-01 22:21:48
一、安装Anaconda 1 下载Anaconda安装脚本 为了避免漫长的等待,镜像源选择国内的清华镜像源,镜像源地址: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 我选择最新版本5.3.1,执行如下命令下载: wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh 2 安装可能依赖 yum -y groupinstall "Development tools" yum -y install bzip2 3 安装 3.1 执行命令 bash Anaconda3-5.3.1-Linux-x86_64.sh 3.2 ENTER确认 3.3 接受协议 3.4 确认安装路径,我选择默认路径 /root/anaconda3 3.5 同意将Anaconda3安装信息写入配置文件,如果不同意后续需手动添加 3.6 不安装VSCode 4 配置环境信息 注:如果在上述3.5步中选择了同意则跳过此步 将以下内容添加到 /root/.bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # added by