哪些网站做批发/今天重大新闻头条新闻
项目场景:
在Ubuntu上安装完anaconda后,发现每次打开终端后都会自动进入到base的虚拟环境中去,虽然在这些环境下使用问题不大,但一些软件的安装在虚拟环境下有影响。每次使用conda deactivate退出也很麻烦。
问题描述
安装玩之后,打开终端,发现前面带有“base”,此时,可以输入如下命令,退出base环境:
conda deactivate
解决方案:
方法一:
打开终端,有base环境的,直接输入下面代码,然后新开终端,新开的便会退出环境
conda config --set auto_activate_base false
方法二:
永久取消base字样办法:
1、在新终端中输入:gedit ~/.bashrc
2、在打开的文件最后加上一句命令:conda deactivate
3、重新打开终端即可消除base字样。
若在终端中输入conda deactivate,也可消除base字样,但是一次性的,再次打开终端依然存在base字样。在.bashrc文件添加命令:conda deactivate可以永久消除base字样。
1,通过将auto_activate_base参数设置为false实现:
conda config --set auto_activate_base false
2,那要进入的话通过conda activate base
3,如果反悔了还是希望base一直留着的话通过
conda config --set auto_activate_base true
恢复
@Overridepublic void run() {bytes = mmInStream.read(buffer);mHandler.obtainMessage(READ_DATA, bytes, -1, buffer).sendToTarget();}
解决:在anaconda安装时选择的初始化,.bashrc中的对应文件如下
#作用应该是一打开终端就初始化conda环境# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/s/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; theneval "$__conda_setup"
elseif [ -f "/home/s/anaconda3/etc/profile.d/conda.sh" ]; then. "/home/s/anaconda3/etc/profile.d/conda.sh"elseexport PATH="/home/s/anaconda3/bin:$PATH"fi
fi
unset __conda_setup
# <<< conda initialize <<<
把这段注释掉,如下
#不让conda自己初始化
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
#__conda_setup="$('/home/s/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
#if [ $? -eq 0 ]; then
# eval "$__conda_setup"
#else
# if [ -f "/home/s/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/home/s/anaconda3/etc/profile.d/conda.sh"
# else
# export PATH="/home/s/anaconda3/bin:$PATH"
# fi
#fi
#unset __conda_setup
# <<< conda initialize <<<
此时没有了(base)标志,但是输入python默认的是python2.7.这就是问题2
问题2:消除base后,在终端输入python时发现,此时python的版本不是对应anaconda版本里的
解决:在.bashrc文件末尾加上anaconda的路径,如下
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples# If not running interactively, don't do anything
case $- in*i*) ;;*) return;;
esac# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth# append to the history file, don't overwrite it
shopt -s histappend# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; thendebian_chroot=$(cat /etc/debian_chroot)
fi# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" inxterm-color|*-256color) color_prompt=yes;;
esac# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yesif [ -n "$force_color_prompt" ]; thenif [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then# We have color support; assume it's compliant with Ecma-48# (ISO/IEC-6429). (Lack of such support is extremely rare, and such# a case would tend to support setf rather than setaf.)color_prompt=yeselsecolor_prompt=fi
fiif [ "$color_prompt" = yes ]; thenPS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
elsePS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1";;
*);;
esac# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; thentest -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"alias ls='ls --color=auto'#alias dir='dir --color=auto'#alias vdir='vdir --color=auto'alias grep='grep --color=auto'alias fgrep='fgrep --color=auto'alias egrep='egrep --color=auto'
fi# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.if [ -f ~/.bash_aliases ]; then. ~/.bash_aliases
fi# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; thenif [ -f /usr/share/bash-completion/bash_completion ]; then. /usr/share/bash-completion/bash_completionelif [ -f /etc/bash_completion ]; then. /etc/bash_completionfi
fi#不让conda自己初始化
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
#__conda_setup="$('/home/s/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
#if [ $? -eq 0 ]; then
# eval "$__conda_setup"
#else
# if [ -f "/home/s/anaconda3/etc/profile.d/conda.sh" ]; then
# . "/home/s/anaconda3/etc/profile.d/conda.sh"
# else
# export PATH="/home/s/anaconda3/bin:$PATH"
# fi
#fi
#unset __conda_setup
# <<< conda initialize <<<#显示conda下的Python
export PATH="/home/s/anaconda3/bin:$PATH"
执行
source .bashrc
输入python默认输出conda中的Python了
参考:
ubuntu18.04安装anaconda后终端出现base字样
相关文章:

【Ubuntu 系统使用进入,自动进入base虚拟环境解决最全】
项目场景: 在Ubuntu上安装完anaconda后,发现每次打开终端后都会自动进入到base的虚拟环境中去,虽然在这些环境下使用问题不大,但一些软件的安装在虚拟环境下有影响。每次使用conda deactivate退出也很麻烦。 问题描述 安装玩之…...

C++项目——云备份-⑨-服务端与客户端功能联调
文章目录 专栏导读1.服务端源代码2.客户端源代码3.浏览器访问测试//listshow 4.上传文件测试5.文件下载测试 专栏导读 🌸作者简介:花想云 ,在读本科生一枚,C/C领域新星创作者,新星计划导师,阿里云专家博主&…...

Linux两条服务器实现相互免密登录
1.准备两台虚拟机,一台充当服务器端(server),一台充当客户端(client) 服务器端(server):192.168.75.139 客户端(client):192.168.75…...

华纳云Ubuntu环境怎么编译安装PHP和Nginx
在Ubuntu环境中编译安装PHP和Nginx需要进行一系列步骤。以下是安装PHP和Nginx的一般过程: 1. 更新系统: 首先,确保您的系统是最新的,运行以下命令更新软件包列表和已安装的软件包: sudo apt update sudo apt upgra…...

Ubuntu 23.10(Mantic Minotaur)正式发布,支持Linux 6.5和GNOME 45
导读Canonical 近日正式发布了 Ubuntu 23.10(Mantic Minotaur)操作系统,其中包含一些最新的 GNU/Linux 技术、改进的硬件支持以及许多其他变化。 Ubuntu 23.10 采用了最新的 Linux 6.5 内核系列,并为 Ubuntu 桌面和服务器增强了 z…...

Linux:KVM虚拟化
本章操作基于centos7系统 简介 KVM是Kernel Virtual Machine的简写,目前Redhat只支持在64位的Rhel5.4以上的系统运行KVM,同时硬件需要支持VT技术。KVM的前身是QEMU,在2008年被redhat公司收购并获得了一项hypervisor技术,不过redh…...

HTML标签,列表,表格相关
HTML标签的分类 HTML标签可以分为以下几类: 标题标签:用于定义网页的标题,分为h1、h2、h3、h4、h5和h6。 段落标签:用于定义文本的段落,常用的有p标签。 链接标签:用于定义链接,常用的有a标签…...

【音视频】Linux | FFmpeg源码搭建
Linux | FFmpeg源码搭建 时间:2023-06-21 文章目录 `Linux` | `FFmpeg`源码搭建@[toc]1.参考2.获取源码2-1.建立工作目录2-2.获取`AAC`2-3.获取`X264`2-4.获取`X265`2-5.获取`FFmpeg`3.编译/安装3-1.编译`AAC`3-1-1.解压源码3-1-2.编译3-1-3.安装3-2.编译`X264`3-2-1.解压源码…...

Ansible中常用模块
1.ansible实现管理的方式 Ad-Hoc //利用ansible命令直接完成管理,主要用于临时命令使用场景 playbook //ansible脚本,主要用于大型项目场景,需要前期的规划 2.Ad-Hoc执行方式中如何获得帮助 ansible-doc …...

2000-2021年上市公司产融结合度量数据
2000-2021年上市公司产融结合度量数据 1、时间:2000-2021年 2、指标:股票代码、年份、是否持有银行股份、持有银行股份比例、是否持有其他金融机构股份、产融结合 3、来源:上市公司年报 4、范围:上市公司 5、样本量ÿ…...

2023最新最全Web自动化测试面试题
1、Selenium 中 hidden 或者是 display none 的元素是否可以定位到? 不可以。可以写 JavaScript 将标签中的 hidden 先改为 0,再进行定位元素。 2、Selenium 中如何保证操作元素的成功率?也就是说如何保证我点击的元素一 定是可以点击的&am…...

List的add(int index,E element)陷阱,不得不防
项目场景: 项目中有两个List列表,一个是List1用来存储一个标识,后续会根据这个标识去重。 一个List2是用来返回对象的,其中对象里也有一个属性List3。现需要将重复的标识数据追加到List3 我想到的两个方案: 尽量不动…...

如何使用drawio画流程图以及导入导出
画一个基本的流程图 你可以在线使用drawio, 或者drawon创建很多不同类型的图表。 如何使用编辑器,让我们以一个最基本的流程图开始。 流程图,就是让你可视化的描述一个过程或者系统。 图形和很少部分的文字表达就可以让读者很快的理解他们需要什么。 创…...

腾讯云轻量服务器“镜像类型”以及“镜像”选择方法
腾讯云轻量应用服务器镜像类型分为应用镜像、系统镜像、Docker基础镜像、自定义镜像和共享镜像,腾讯云百科txybk.com来详细说下不同镜像类型说明和详细介绍: 轻量应用服务器镜像类型说明 腾讯云轻量应用服务器 应用镜像:独有的应用镜像除了包…...

docker-compose 简单部署Flask + Redis + Nginx环境搭建网站
主博客目录:《从零开始学习搭建量化平台笔记》 主项目计划需要搭建一个 Flask Redis Nginx环境 来制作一个可视化的网站,为了避免搭完就忘,因此就有了这个博客。 任务:搭建一个内网通信且只有由Nginx代理发放的网页端显示环境。…...

debian和ubuntu
Debian和Ubuntu是两种流行的Linux发行版,它们之间有密切的关系,但也存在一些重要的区别。 关系: Ubuntu是基于Debian创建的。这意味着Ubuntu使用与Debian相同的APT包管理系统,并共享来自Debian库中的大量包和库。 区别…...

恒驰服务 | 华为云数据使能专家服务offering之数仓建设
恒驰大数据服务主要针对客户在进行智能数据迁移的过程中,存在业务停机、数据丢失、迁移周期紧张、运维成本高等问题,通过为客户提供迁移调研、方案设计、迁移实施、迁移验收等服务内容,支撑客户实现快速稳定上云,有效降低时间成本…...

AI与Prompt:解锁软件开发团队的魔法咒语,在复杂任务上生成正确率更高的代码
AI与Prompt:解锁软件开发团队的魔法咒语 写在最前面论文:基于ChatGPT的自协作代码生成将团队协作理论应用于代码生成的研究自协作框架原理1、DOL任务分配2、共享黑板协作3、Instance实例化 案例说明简单任务:基本操作,生成的结果1…...

深度学习02-数据集格式转换
背景: 通常搜集完数据图片后,我们会用labelimg进行图片标注,比较高版本的labelimg支持的标注格式有三种,PascalVOC、YOLO、CreateML,标注的时候可以根据自己的算法模型数据集需求选择相应的格式,当然&…...

【c++|opencv】一、基础操作---1.图像读取
every blog every motto: You can do more than you think. https://blog.csdn.net/weixin_39190382?typeblog 0. 前言 有关c操作opencv记录 1. 正文 1.1 图像读取、显示、保存 // 读取、显示、保存图像#include <opencv2/opencv.hpp> #include <iostream>us…...
【2023.10.30练习】C语言-循环右移字符
计算机能力挑战初赛2020.19题 题目描述: 现要对一个由字符a-z和A-Z组成的字符串进行解密,已知加密规则是: 字符串中所有字符分别在大写或小写的字母表中被循环左移5位(fGh-->aBc), 输入:一个加密过的字符串&#…...

C++ 自引用指针this(整理)
使用例子: #include <iostream> #include <Windows.h> using namespace std; class A { public:A(int x1){x x1;}void disp(){cout<<"this"<<this<<" when x"<<this->x<<endl;} private:int x;…...

pyzed.sl 突然 ImportError: DLL load failed while importing sl: 找不到指定的程序。 的解决
问题描述 >>> import pyzed.sl Traceback (most recent call last):File "<stdin>", line 1, in <module> ImportError: DLL load failed while importing sl: 找不到指定的程序。解决 1 按网上说的,将bin文件夹下所有dll复制到py…...

STM32 Cube配置RS485 Modbus
STM32CUBUMX配置RS485 modbus STM32(从机)亲测可用 STM32开发(六)STM32F103 通信 —— RS485 Modbus通信编程详解...

global,nonlocal
1.global 在局部,引入全局变量,使得局部变量可以修改全局变量 a 10 # a为全局变量def func():global a #把外面的全局变量引入到局部a 20 #创建局部变量,修改全局变量func() print(a) #20 2.nonlocal 在局部,引入外层的…...

HTML5教程
HTML5读书笔记 jack 2023.10.24 来源:HTML5 Canvas | 菜鸟教程 常识: HTML5 是下一代 HTML 标准。 HTML , HTML 4.01的上一个版本诞生于 1999 年 <!DOCTYPE html>用于声明下面代码是H5; 浏览器支持 你可以让一些较早的浏览器(不支…...

vulnhub momentum 靶机复盘
环境配置 到学校了 原来的桥接配置要改 这里记录几个点备忘 1.virtualbox 桥接 未指定 重新安装驱动VBoxNetLwf.inf 2.配置完靶机启动失败 手动安装VBoxNetLwf.inf 不要用virtualbox自带的netlwfinstall 3.配置完nmap扫不到 rw init/bin/bash 进去看看网卡配置 信息收集…...

c++和java实现策略模式的差异
一、C和java的差异 实例化方式 c的对象有两种实例化方式,一种是局部变量中直接实例化。一种是new出来的。 MyClass myclass; //第一种方式 MyClass* myclassPtrnew MyClass(); //第二种方式java的对象构建,没有第一种方式,java的对象都…...

vim
简介 vim是一款多模式的文本编辑器,vim里面还有很多子命令,来进行代码的编写操作 常用模式图 命令模式 光标移动 shif $ 光标定义到当前行的最右侧结尾 shift ^ 光标定义到当前行的最左侧开头 shift g 光标定位到文本最末尾…...

AcWing93. 递归实现组合型枚举:输出从1~n中随机选出的m个整数
题目 从 1∼ n n n 这 n n n 个整数中随机选出 m m m 个,输出所有可能的选择方案。 输入格式 两个整数 n , m , n,m, n,m, 在同一行用空格隔开。 输出格式 按照从小到大的顺序输出所有方案,每行 1 个。 首先,同一行内的数升序排列&a…...